First Things To Do on a New Django Project
djangozen.com
djangozen.com
My package is on github here: http://github.com/dziegler/django-create-project/tree/master
There's not much documentation because I wasn't really expecting anyone but myself to use it, but basically once it's installed, it'll install a binary file in your path. So instead of
django-admin.py startproject project_name
you would do create_project project_name
It'll auto-create your wsgi handler, an apps, templates, static/css, static/js, static/images directories, create a localsettings file, and update your settings. It also automatically installs some common django apps I like to use, like django-command-extensions, django-debug-toolbar, django-css, and clevercss. Like I said, I wasn't really planning on other people finding this valuable and using it, so some of these options are customized to my preferences and you'd probably have to hack it a little bit, but maybe someone here will find it helpful.There's also http://bitbucket.org/neithere/django-harness/src/ which I think might do some similar things, but I found out about it after I already rolled my own thing which works pretty well for me.
http://github.com/tvon/django-gig/tree/master
Yours is written better... and mine pisses all over the default Django layout (which I've never been a fan of).
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.
I think these are a sign that your applications are too big. I'm biased, but I would use http://chris-lamb.co.uk/projects/django-lint/ over whilst fleshing out the models (which reports on exactly this issue).
Trying to turn Django development into a cookie cutter process seems silly.
Do it your own way. Learn it. Understand it. Django is a magical and powerful beast that can be used in many wonderful ways.
Where "works for you" the vast majority of the time really just means "the model fits your needs" (that is, username that fits the validator, non-unique email addresses, and so forth).
Don't get me wrong, I'm really grateful for contrib.auth, I just find myself butting heads with it fairly often.
To recommend it as something you should do when you make a Django app is bad advice, particularly for the beginners, who will just be confused by the extra steps.
I recommend anyone who isn't familiar with Django simply do the "My First App" tutorial. After that, the dev will find their own way, and I doubt it will be much like yours, or mine.
http://docs.djangoproject.com/en/dev/topics/auth/#other-auth...
I agree that it's an absurd recommendation, however.