On 15 March 2012 12:33, Andrew Cutler <and...@adlibre.com.au> wrote: > > We also want to be able to distribute a self contained Django project > with sane defaults (and this is where it gets tricky). >
Answering my own question here... But I've finally achieved the "holy grail" of Django project deployment using setup.py (setuptools) and pip. In a clean virtualenv... run one deployment command... sit back and done. Here we have the deployment command for a Django timesheet system we've written: # pip install git+git://github.com/adlibre/Adlibre-TMS.git A (trivially) customised manage.py is put into ./adlibre_tms/ along with a sample local_settings.py, leaving all the immutable source files in ./lib/python/site-packages/adlibre_tms/. The way settings.py is imported is a little magical, but so far it hangs together nicely. Directories for media, static files and sqlite database are also created. Now... I probably wouldn't recommend this method unless you're planing on re-distributing a Django project as a complete application. If you're just deploying your own stuff then dealing with distutils/setuptools is probably not worth the heartache and hair-pulling. But at least this shows that it is possible. It is also possible to pull in your own package dependencies direct from github using setuptools 'dependency_links' urls and github tarball links. (Which is truly magical when it works) Hopefully this will save someone else some time... Cheers, Andrew -- 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.