Reputation: 900
I have Django set up and working well on my local machine, and I'm now attempting to deploy it in a production environment with mod_wsgi
. One variable is that locally I have Python 2.7.3 and in my production environment (EC2) I have Python 2.6.8, which is theoretically still compatible with Django 1.5.
I'm able to see the intro Django page and successfully ran ./manage.py startapp myapp
and ./manage.py syncdb
, but after restarting httpd
and attempting to hit the site through my browser I receive a 500
error and the following shows up in my error_log
:
mod_wsgi (pid=7852): Exception occurred processing WSGI script '/path/to/my/django.wsgi'.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 59, in load_middleware
mw_instance = mw_class()
TypeError: auth() takes exactly 1 argument (0 given)
My settings are, for all intents and purposes, identical to those in my local environment (save the DEBUG flag, etc.). I'm unable to find out where the configuration issue is. I personally find the Django documentation rather poor for deployment and not too many others have run into this particular wall.
I'm happy to give more detail if needed.
Upvotes: 0
Views: 524
Reputation: 900
I fume when this happens, but I found the issue moments after posting this. I had a line in settings.py
under the middleware section that was pointing to the auth
context processor and not a middleware module. I removed it and all is well.
Upvotes: 3