Note that there are some explanatory texts on larger screens.

plurals
  1. PO500 internet server error error_log:TemplateSyntaxError: Caught ImportError while rendering: No module named friends
    primarykey
    data
    text
    <p>Recently I am using django and mod_wsgi on Apache.</p> <p>I am follow the following steps found in a webpage:</p> <p><strong>"My application in / mnt / www /, the name of the called mysite, apache and created in the mysite media directory, and then do the following:"</strong></p> <p>create apache_django_wsgi.conf file, as follows:</p> <pre><code>Alias ​​/ site_media / / mnt / www / mysite / media / &lt;Directory /mnt/www/mysite/media&gt; Order allow, deny Options Indexes Allow from all IndexOptions FancyIndexing &lt;/ Directory&gt; Alias ​​/ media / / usr/local/lib/python2.5/site-packages/django/contrib/admin/media / &lt;Directory /usr/local/lib/python2.5/site-packages/django/contrib/admin/media&gt; Order allow, deny Options Indexes Allow from all IndexOptions FancyIndexing &lt;/ Directory&gt; WSGIScriptAlias ​​/ / mnt / www / mysite / apache / django.wsgi &lt;Directory /mnt/www/mysite&gt; Order deny, allow Allow from all &lt;/ Directory&gt; &lt;Directory /mnt/www/mysite/apache&gt; Allow from all &lt;/ Directory&gt; </code></pre> <p>create django.wsgi file, as follows:</p> <pre><code>import os, sys # Calculate the path based on the location of the WSGI script. apache_configuration = os.path.dirname (__file__) project = os.path.dirname (apache_configuration) workspace = os.path.dirname (project) sys.path.append (workspace) os.environ ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' os.environ ['PYTHON_EGG_CACHE'] = '/ tmp' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler () print&gt;&gt; sys.stderr, sys.path </code></pre> <p>I have followed these step but when I run it under Apache through a browser, I get a 500 Internet Server Error. Then I check the erro_log: it says:"TemplateSyntaxError: Caught ImportError while rendering: No module named friends" (friends is the name of one of my module)</p> <p>The path of my site is /var/BigPrject/mysite</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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