Mercurial > hg > savane-forge
view doc/HACKING @ 363:7d64cbe0ef62 draft
Remove useless symlinks
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 24 Apr 2012 13:22:15 -0400 |
parents | 6d10f19effbf |
children |
line wrap: on
line source
Directory layout ================ * 'savane/' directory contains all the python(django) code. * 'static_media/' all the css and images * 'templates/' all the templates that are necessary to run savane When deploying Django, the top-level directory will be added to the Python path (sys.path). So all packages are specified relative to this directory. e.g.: import savane.my.views In particular, 'savane' is the main package. It may be installed at another point of the Python path, e.g. in '/usr/share/pyshared/savane', in which case the top-level directory will only contain installation-specific files: 'manage.py', 'settings.py', and 'url.py'. Debugging ========= To autoload Django models when running './manage.py shell', check: http://www.djangosnippets.org/snippets/549/ This requires IPython, which adds completion and other niceties to the Python shell. Git === Do avoid messy merges whenever you forgot to make a 'git pull' before starting to work, check: git config branch.master.rebase true This makes your latest changes much clearer. Beware that rebase can be a dangerous tool - better issue a 'gitk' before pushing, as a rule of the thumb, and rebase as necessary. More in-depth explanation with examples (though the author works on a fork, not on the project master branch): - http://www.gitready.com/advanced/2009/02/11/pull-with-rebase.html Testing ======= You need to create a test_savane database: mysql -e "CREATE DATABASE test_savane DEFAULT CHARACTER SET utf8;" mysql -e "GRANT ALL PRIVILEGES ON test_savane.* TO 'savane' IDENTIFIED BY 'yourpass';" Run your tests with:: ./manage.py test svmain my