I have encountered a hodgepodge of errors trying to bring my django site into production with Apache. Having finally gotten mod_wsgi sorted and Apache at least seeming to be trying to load the site I'm seeing a number of confusing problems in the debug details when the homepage fails to load.
None of these errors emerge when I fire up the site using python manage.py runserver 10.10.10.214:8080 - it works 100% fine that way
- Import errors - I cannot
from x import y- for some reason it will only allow me to dofrom x import *An example was#from django.conf.urls import patterns, include, urlgave an error - I had to change tofrom django.conf.urls.defaults import * - Permission errors - for example, I had to chmod the DB file which worked fine before. No big deal I suppose but I just wondered why
- DB field errors:
Cannot resolve keyword 'user_id' into field. Choices are: end_date, id, singleDate, start_date, useruser_id worked just fine in standalone mode. - Apache log was giving errors like
TemplateSyntaxError: Caught ImportError while rendering: No module named staticfileswhich I just lazily bypassed by commenting outdjango.contrib.staticfilesin settings.py. This solved nothing, needless to say
It almost felt like the files were being handled on a standalone basis and not within the django framework. Has anyone experienced these kind of teething problems before? I was foolishly thinking I could just plug in. I have a (unfounded) optimistic feeling it must just be a directive in some file.
Cheers, Arthur