How to fix “ViewDoesNotExist at /admin/”

Common problem when migrating from 0.96 to 1.0…

  1. Add “django.contrib.admin” to INSTALLED_APPS
  2. Add “from django.contrib import admin” to urls.py
  3. Add “admin.autodiscover()” in urls.py
  4. Change line to (r’^admin/(.*)’, admin.site.root),

Link to relevant page in Django tutorial

4 Responses to “How to fix “ViewDoesNotExist at /admin/””

  1. Can you post the complete error message?

  2. Rachel says:

    Sorry, I’ve fixed the problem now so can’t get the error message without breaking something that I need to be working…

    But if you google on the phrase “ViewDoesNotExist at /admin/”, there’s plenty of examples of the full error message.

  3. Paul says:

    Nice touch to include the link to the official docs as well. Note that your step 4 needs a little cleanup — admin.site.root should be passed as an object, not called, so no empty parens.

  4. Rachel says:

    Thanks Paul. I’ve removed the stray LH bracket…

Leave a Reply