1. Dmitri Lebedev
  2. fastdev-django

Wiki

Clone wiki

fastdev-django / Useful_Shell_Commands

Running the server

make run is all you need. Starts the server and also

  • updates compiled translation files
  • buildouts Django if needed or re-buildouts when buildout.cfg was updated.
  • installs Sass if not present
  • runs syncdb on the first run

All this is possible thanks to GNU Make.

IPython Shell

make shell_plus

Runs the shell_plus (a shell from django-extensions that loads all the installed models), with IPython. Bin/django will be re-built if you have updated buildout.cfg.

Working with Translations

  • make make_trans to extract translation strings in locale folder.
  • compilemessages command is done implicitly when you run the server, but if necessary, use make locales

Checking Your Code

  • make check_pyflakes to use the static analyzer
  • make check_pep8 to check if your code follows the PEP-8 rules.

Of these two, pyflakes check should always be Ok.

WSGI for (Webfaction) Hosting

I have not tested this script on other hosters, so can't tell you if it works. But in Webfaction, you can do

make webfaction

and get the WSGI script that will run your project properly, through bin/django, without site-packages.

Updated