My admin area decided today it was going to start throwing a 404 error
for every user.
When I go to the admin, under "Auth" and click "users" all is well. I'm
presented with a list of users.
When I try to click one of the users - any of the users - it 404s. Even
if I click on my own user name.
Try setting DEBUG=True and reading the 404 error page.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com
Page not found (404)
Request Method: GET
Request URL: http://gretschpages.com/admin/auth/user/1/
You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard
404 page.
MerMer
Mine validate.
Or am I misunderstanding?
Try running "manage.py syncdb" to install any permissions that might
be missing. I think an ObjectDoesNotExist exception is being raised
somewhere, causing the 404. I seem to recall having a similar problem
once, where the PermissionDoesNotExist exception was causing a 404.
Merric
Adrian, I think you're right about ObjectDoesNotExist, and I think
something in my database is off... any Ideas how to track it down?
This is just killing me... I can't figure out why the admin is flaking
on auth. I've noticed it freaks out on auth_users and auth_user_groups,
but nothing else, not even gp_users, which extends auth_users.
Anyone got any more ideas? I kind of need user admin!
Hey Tim,
"svn update" your code, assuming you're using the Django development
version. Then, making sure DEBUG=True, try loading the admin user page
again. You will get a more useful error message. Let's cross our
fingers that the error message will help you debug what's wrong.
DoesNotExist at /admin/auth/user/1/
ContentType matching query does not exist.
Request Method: GET
Request URL: http://gretschpages.com/admin/auth/user/1/
Exception Type: DoesNotExist
Exception Value: ContentType matching query does not exist.
Exception Location:
/home2/baxter/lib/python2.4/django/db/models/query.py in get, line 213
I'm not exactly sure what it means, but it's DEFINITELY more helpful.
Perhaps I should look at my content-type table?
Run this code:
"""
from django.contrib.contenttypes.management import create_contenttypes
from django.db.models import get_apps
for app in get_apps():
create_contenttypes(app, created_models=None, verbosity=2)
I had a mismatch between content_types and permissions. Not sure how it
happened, but it's fixed!
Thanks to everyone, espeically Adrian, for your help. I feel like I can
actually use the admin again!