On 17-8-2012 1:31, Mike Dewhirst wrote:
> On 17/08/2012 4:06am, Melvyn Sopacua wrote:
>> On 16-8-2012 11:33, Mike Dewhirst wrote:

>> - Perhaps do the same with editor modelines, like the one you have for
>> emacs. Vi(m)'s start with either vim: vi: or ex:.
> 
> Not sure what you mean here.

The -*- coding: utf-8 -*- line.

>> - Same with db_table in the Meta class. if it's not set, don't create
>> one: it introduces a POLA violation, cause one expects upon renaming the
>> model to have a new database table.
> 
> The script doesn't rename any models.

I know. But if you come back to the code and change the model name you
now have a db_table Meta class to deal with that wasn't there before.

> Also, db_table isn't set in any models in (my) models.py because Django
> automatically constructs the table name. But it is necessary in the
> separate files in the models directory.

I'm quite sure only app_label is needed.

>> - I'm kind of missing the ability to "tell which models go in to which
>> file".
> 
> Each model goes into its own file named:
> 
>      <projectroot>/<approot>/models/<model-classname>.py
> 
> and contains only the imports necessary for that model. Each individual
> model is named as a specific import in:
> 
>      <projectroot>/<approot>/models/__init__.py
> 
> so that other apps which relied on importing them can still do so
> without modification.

I realize that, but you go from one end of the spectrum to the other.
The reorganizations I've done ended up with 3 or 4 files in the models
dir, with a base.py containing abstracts and all models that are tightly
related in one file.
Either way, thanks again for the work. I will pick it up in a few weeks
and build on your code if someone doesn't beat me to it.
-- 
Melvyn Sopacua

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to