On Fri, Sep 9, 2011 at 4:35 PM, Justin Lilly <justinli...@gmail.com> wrote:
> Not sure why this particular ticket is marked as DDN, as it seems like
> a no-brainer. The patch provides a more clear error message when a
> user is attempting to load an app which doesn't have a models.py.
>
> https://code.djangoproject.com/ticket/7198
> https://github.com/django/django/pull/39
>
> Happy to respond to any feedback, as I think this is a worthwhile
> change.

As Carl recently commented on the referenced ticket, the DDN was
likely due to a decision on whether or not to require a models.py at
all.

I'm a fan of not requiring a models.py, as IMHO it shouldn't be any
different than other common files found in an app e.g. urls.py,
templatetags dir, etc.  If I don't need any models for my app, then
why must I still have a models.py?  That said, it also seems there
could be some backwards incompatibilities if code or external tools
rely on a valid app including a models.py file.

For the record, about 20% of the models.py files in the django
codebase are empty (or just contain a comment):
$ find . -size -60c -name 'models.py' | wc -l
44
$ find . -name 'models.py' | wc -l
211

The issue of a missing models.py file also seems to be a frequent
visitor to our ticketing system:
https://code.djangoproject.com/ticket/3125
https://code.djangoproject.com/ticket/3310
https://code.djangoproject.com/ticket/4153
https://code.djangoproject.com/ticket/6883
https://code.djangoproject.com/ticket/7198
https://code.djangoproject.com/ticket/10661
https://code.djangoproject.com/ticket/13985
https://code.djangoproject.com/ticket/15605

...and there's been a few occasions where we've had our own issues
with missing models.py files:
https://code.djangoproject.com/changeset/6991
https://code.djangoproject.com/changeset/7950
https://code.djangoproject.com/changeset/12156
https://code.djangoproject.com/changeset/12170
https://code.djangoproject.com/changeset/13670

Gary

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

Reply via email to