I'm making a pretty simple Django app and I cant get the Admin site to behave...
Symptoms
- the url
.../admin/
shows me the expected login form - if I fill in the form incorrectly I get relevant error messages
- if I fill in the form correctly with the details of a superuser (created via manage.py createsuperuser) then the page does not redirect or come up with errors
- using the shell I can successfully authenticate the user I was trying to log in with
- examining the auth_user database table, is_staff, is_avctive, and is_superuser are all set to 1
if I go to the admin login and attempt to login then the server console output looks fine:
[25/Jan/2013 06:27:28] "GET /admin/ HTTP/1.1" 200 2028 [25/Jan/2013 06:27:34] "POST /admin/ HTTP/1.1" 302 0 [25/Jan/2013 06:27:34] "GET /admin/ HTTP/1.1" 200 2028
Configuration:
In my settings file I have:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin', ...
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)
I haven't changed from the default authentication backend
In my url config I have:
from django.contrib import admin
admin.autodiscover()
.......
url(r'^admin/', include(admin.site.urls)),
I'm running django 1.3.1 and Python 2.7
Question:
How can I fix this? What am I missing?