17 ms·
I found myself doing several of these things over and over when creating a new Django project, so I made a script that wraps the django-admin.py startproject co
by thomaspaine 17y ago
I found myself doing several of these things over and over when creating a new Django project, so I made a script that wraps the django-admin.py startproject command. Some of these tips I don't quite understand, like creating a custom authentication backend (I've only had to do this once), and creating global template context processor and middleware files. I prefer to keep those bundled individually with the app that uses it. Also, not all of my apps use forms, so why would I make a forms.py for each app?
My package is on github here: http://github.com/dziegler/django-create-project/tree/master 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/ 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.
- tvon 17y agoInteresting, I wrote something similar here: http://github.com/tvon/django-gig/tree/master 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).