PROBLEM: I am attempting to implement the Django Admin on a new project,
but when I log in the page simply reloads to the login screen as if nothing
was done. It should be noted that if I use incorrect credentials I get the
error message as expected.

URLS.py:
from django.conf.urls import patterns, url, include
from django.conf import settings
from bus.certs.views import index

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
                       (r'^apps/bus/certs/$', index),
                       (r'^apps/bus/certs/index$', index),
                       (r'^apps/bus/certs/listing/',
include('bus.certs.listing.urls')),
                       (r'^apps/bus/certs/application/',
include('bus.certs.application.urls')),

                       # Example:
                       # (r'^apps/bus/certs/',
include('bus.certs.foo.urls')),

                       # Uncomment the admin/doc line below and add
'django.contrib.admindocs'
                       # to INSTALLED_APPS to enable admin documentation:
                       # (r'^admin/doc/',
include('django.contrib.admindocs.urls')),

                       # Uncomment the next line to enable the admin:
                       (r'^apps/bus/certs/admin/',
include(admin.site.urls)),
                       )

ADMIN.py:
import django.contrib
import common.models

print 'inside admin.py'

django.contrib.admin.site.register(common.models.Application)

SHELL logs:
** on initial page load:
[12/11/2013 08:16:07] "GET /apps/bus/certs/admin/ HTTP/1.1" 200 48842

** on entry of incorrect credentials:
[12/11/2013 08:17:35] "POST /apps/bus/certs/admin/ HTTP/1.1" 200 49209
[12/11/2013 08:17:35] "GET /apps/bus/certs/static/admin/css/login.css
HTTP/1.1" 304 0
[12/11/2013 08:17:35] "GET /apps/bus/certs/static/admin/css/base.css
HTTP/1.1" 304 0
[12/11/2013 08:17:35] "GET /apps/bus/certs/static/admin/img/icon_error.gif
HTTP/1.1" 304 0
[12/11/2013 08:17:35] "GET /apps/bus/certs/static/admin/img/nav-bg.gif
HTTP/1.1" 304 0

** on entry of correct credentials:
[12/11/2013 08:19:16] "POST /apps/bus/certs/admin/ HTTP/1.1" 302 0
[12/11/2013 08:19:17] "GET /apps/bus/certs/admin/ HTTP/1.1" 200 48682

Things I've done/tried:

   1. reset the password using the "users[0].set_password('whatever')"
   command (found here:
   http://coderseye.com/2007/howto-reset-the-admin-password-in-django.html)
   2. deleted all recs in django_sessions table (MySQL db) and verified
   that session recs are being created on attempts.

Any help would be appreciated. Please let me know if there is other info I
can provide that I didn't think to provide above.

-- 
Keith Edmiston

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP_gv7JzbDxrS5bhJjEKcH417o6bfbEh1VEe6%3DxBTRH_8JP-Ug%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to