Installing typical Django application (created by Halogen D.G. team)

Audience

This article is addressed to Halogen D.G. developers and administrators, and to those customers, who are interested into setting up our applications.

Before you start

Please read the following souces of inforamation:

Typical application structure

In fact, we follow Django conventions to store our application data, with a single exception: we devide settings.py file to the at least 2 parts: default settings for project (file 'default_settings.py') and custom settings for the install (settings.py). File settings.py imports default_settings.py at beginning, so it could override any defaults. File settings.py is not directly added to subversion, instead an example version is added (settings-sample.py) so you should copy and customize it.

  • project root (exported from subversion)
    • project_name
      • app1
      • app2
      • app ...

Deployment options

Recommended setup is using mod_fcgi due to:

  • Better control on number of processes, CPU, RAM usage.
  • Less buggy (since mod_python and mod_php are in conflict sometimes, for example with SSL libs
  • Developer or customer can restart application without disturbing us

In situations when above reasons are not significant (for example for a small, internal project, rarely changed) we would recommend to use mod_python since easier setup.

Examples

(Press "Save as...")

Please note that MEDIA_ROOT in the settings.py should actually point to your htdocs directory. But to serve static files directly by Apache server, we use Alias directive so mod_python and mod_fcgi does not serve static files via Python, and we obtain better performance this way.

Comments: 0

No comments.

Post a comment

Guests can\'t leave comments.