Wednesday, August 18, 2010

Django - Deploy an application to djangoeurope.com

I followed these steps to deploy a Django application into djangoeurope.com:
  • Register to djangoeurope.com and enter to the Panel (panel.djangoeurope.com)
  • Click into the installdjango option and create a project (it is called application in the webpage).
  • Run python manage.py startapp appname (the application should be called equal to our project's application).
  • Access with ssh and sftp to our space and put our original application into the corresponding folder. Overwrite all files except settings.py and settings_development.py.
  • Merge the files settings.py from djangoeurope.com and the one of our application.
  • Copy the content of settings.py to settings_development.py.
  • Run python manage.py syncdb.
  • Modify file lighttpd/django.conf to be correct.
  • Syncronize with init/appname restart, init/lightppd reload and init/lightppd restart.
Useful utilities when working are the commands
zip -r file.zip directory
,
which compresses the directory into the file, and
unzip file.zip,
which uncompresses the directory.
Caution: if we are in folder a/ and we execute unzip b/file.zip, the content of file.zip will be extracted in our working directory a/!

No comments:

Post a Comment