Login

Tag "deploy"

Snippet List

Read settings from local_settings.py

Each installation of our Django site has slightly different settings -- namely, which database to use. Developers can provide a `local_settings.py` file which lets them override (or, just as usefully, extend) settings that are in `settings.py`. Subversion is told to ignore `local_settings.py`, so it's never checked in. If `local_settings.py` is missing, the site refuses to work. We include a `local_settings_example.py` file so that new developers can get started more quickly.

  • settings
  • development
  • deployment
  • deploy
  • production
  • local
  • local-settings
  • local-deployment
Read More

pavement file for deploying django projects

This is the pavement file I use to deploy a django site. It's in early stages. Right now it copies everything up to the desired server over scp. But I think I'll change it to rsync in the future. It requires pavement, and pexpect. The pavement file takes slight instruction from your settings.py file. For server information, and "lib_apps" to copy into the lib directory. An example of a settings file that I use with this pavement file: http://gitweb.codeendeavor.com/?p=django_empty.git;a=blob_plain;f=settings.py;h=23bda7d2a1eb2a52ca0859004ecccd206dade4ec;hb=5d672178dab282caeed5ff0de7ed807c72e44f74 Specifically, check out the bottom for two vars: "LIB_APPS" and "DEPLOYMENTS" A good example of my empty django project is here: http://gitweb.codeendeavor.com/?p=django_empty.git;a=tree;h=5d672178dab282caeed5ff0de7ed807c72e44f74;hb=5d672178dab282caeed5ff0de7ed807c72e44f74 I think the one thing that's missing is a way to re-spawn fcgi processes. Which I'll hopefully get around to adding sometime soon. Also, I need to do a little work at making sure source control files don't get pushed through scp.

  • django
  • python
  • deploy
  • paver
  • pavement
Read More

Update ContentTypes and Permissions without syncdb

[See blog post](http://paltman.com/2008/04/11/keeping-contenttypes-and-permissions-updated-without-syncdb/) You can put this script in the root of your project and run after deploying updates in your production environment.

  • sql
  • permissions
  • deploy
  • contenttypes
Read More

5 snippets posted so far.