MyDevil.net  »  Help
pl  pl
 

Devil::WWW::Django

Z MyDevil.net


After you add a django vhost using Devil account management system, all static files should be placed in ~/domains/example.com/public_django/media or ~/domains/example.com/public_django/static. They will be available under http://example.com/media address. Of course, you need to change example.com to your domain.

Then you have to start a django project. To keep it clean, change the directory to the domain dir:

cd ~/domains/example.com/

Start a new django project

django-admin.py startproject name

The name parameter can be anything, for instance: blog. For obvious reasons, please do not start a project called public_django.

django-admin.py script should create adirectory with the same name as we provided in the current directory. There is a script manage.py placed in it, which we will need to use to start our django instance. In this example, the directory will be called blog. So, we change our CWD (current working directory) to it, and start our django app:

cd blog
python manage.py runfcgi socket=/usr/home/username/domains/example.com/django.sock
chmod 707 /usr/home/username/domains/example.com/django.sock

You need to change username and example.com to your login, and your domain name.

More advanced users may like to change the worker count, or adjust other settings. More options, that can be passed to manage.py script can be found by invoking:

python manage.py help

If everything went fine, our website should be already visible from your browser.

See also other Devil modules:

WWW Website management
Port TCP/UDP Port opening
Info Account information
MySQL MySQL database management
PgSQL PostgreSQL database management
DNS DNS (domain name system) management
Mail Mail accounts management
Vhost Available vhosts list

Additional services management

Java Access to dedicated Java machine
BinExec Management of 'Launching your own software' service
VPN Management of 'Virtual Private Network' service
PlProxy Management of 'Polish proxy server' service
USProxy Management of 'US Proxy Server' service