Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's the <a href="http://wiki.alwaysdata.com/wiki/D%C3%A9ployer_une_application_Django" rel="noreferrer">alwaysdata wiki entry</a> for setting up Django with fastcgi. Only down-side: it's written in French.</p> <p>Well, I don't speak French, but what it basically says is:</p> <ol> <li>Create a directory named <code>public</code> in the folder of your django project.</li> <li><p>In that directory create the file <code>django.fcgi</code> with the following content:</p> <pre><code>#!/usr/bin/python import os, sys _PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, _PROJECT_DIR) sys.path.insert(0, os.path.dirname(_PROJECT_DIR)) _PROJECT_NAME = _PROJECT_DIR.split('/')[-1] os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % _PROJECT_NAME from django.core.servers.fastcgi import runfastcgi runfastcgi(method="threaded", daemonize="false") </code></pre></li> <li><p>Next, create a .htaccess in the <code>public</code> folder with the following content:</p> <pre><code>AddHandler fcgid-script .fcgi RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L] </code></pre></li> <li><p>If you're planning to include the django admin interface, create this symbolic link in your <code>public</code> directory:</p> <pre><code>ln -s /usr/local/alwaysdata/python/django/1.1/django/contrib/admin/media/ media </code></pre></li> <li><p>In the end your folder tree hierarchy should somehow look like this:</p> <pre><code>myproject/ __init__.py manage.py public/ django.fcgi .htaccess media/ settings.py urls.py myapp/ views.py models.py </code></pre></li> </ol> <p>Hope this helps. I talked with the admin, and he said he will soon provide an English wiki. Let's hope this is going to happen anytime soon.</p> <hr> <p><strong>UPDATE: There is an <a href="http://wiki.alwaysdata.com/wiki/Deploying_a_Django_App" rel="noreferrer">English wiki article now.</a></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload