Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my Django app not work with Apache/mod_python?
    primarykey
    data
    text
    <p>I have Apache setup to serve requests for <a href="http://www.mysite.com" rel="nofollow noreferrer">http://www.mysite.com</a> from this directory:</p> <p>/var/www/html/www.mysite.com</p> <p>The Django site is in /var/www/html/www.mysite.com/mysite.</p> <p>I get this error when I make a request for /mysite/app/foo:</p> <p>(big stack trace) AttributeError: 'module' object has no attribute 'common'</p> <p>'myapp.common' is the first item listed <em>after</em> all the django apps (eg. 'django.contrib.admin') in INSTALLED_APPS in the settings.py file. If I change the order of modules listed, Django chokes on the first path of one of my applications that it encounters. </p> <p>The Python import path seems to be correct, since it's finding mysite.settings:</p> <pre> &lt;Location "/mysite/"&gt; SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /mysite PythonDebug On PythonPath "['/var/www/html/www.mysite.com'] + sys.path" &lt;/Location&gt; </pre> <p>What could be the problem? It's strange that it's complaining about 'common' when the actual list contains 'mysite.common':</p> <pre> INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'mysite.common', .... </pre> <p>Is this a Django bug or do I have something misconfigured? Perhaps some external dependency needs to be added to the import path? It works OK with the Django development server.</p>
    singulars
    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. 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. This table or related slice is empty.
    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