by jdagostino · 17y ago · 0 comments
Look at the django.contrib applications. They are perfect examples of how you should structure your apps. The authentication middleware is in django.contrib.auth. etc.
If you are automatically deleting models.py, views.py, forms.py your doing it all wrong - rarely should an application get large enough to require these changes to application structure in django.
Again django.contrib.admin is the only application that has a views/ directory because it has so many permutations to make generic functionality available to most users.
One thing I would like to add is that I think django-admin.py for projects should create the templates directory and static directory when starting a project. It should also generate forms.py, urls.py (not mentioned in the article) and a templates directory for apps.
No comments yet.