Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 260031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:18:50+00:00 2026-05-11T22:18:50+00:00

In the The Django Book in chapter 6 about the Admin Site, they tell

  • 0

In the The Django Book in chapter 6 about the Admin Site, they tell me to add the follwing URLpattern to urls.py:

urlpatterns = patterns('',
    # ...
    (r'^admin/', include(admin.site.urls)),
    # ...
)

But to make it work on my system, I had to uncomment the following line:

(r'^admin/(.*)', admin.site.root),

Can somebody enlighten me on what the differences are?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:18:50+00:00Added an answer on May 11, 2026 at 10:18 pm

    Both Gabriel and Antti have it the wrong way round, unfortunately.

    admin.site.root is the version 1.0 behaviour. If you have downloaded 1.0 or 1.0.2, that’s what you should use.

    However, there were some changes to the URL handling for Django’s admin very recently, which are part of the yet-to-be-released 1.1. These are primarily to make it possible to use the reverse() function to look up admin URLs. So if you have a recent checkout of the code, you’ll need to use admin.site.urls.

    Your link is to the second edition of the Django Book, which is being updated for version 1.1 – and the docs which Gabriel refers to are also for the current checkout, which has the new version.

    (Just for completeness, I’d note that versions of Django before newforms-admin was merged, prior to 1.0, used admin.urls, not admin.site.urls or admin.site.root.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The book I've been reading about Django mandates heavy usage of a command line
I have a couple special use cases for Django admin, and I'm curious about
In the security chapter of The Django Book , it says that I must
I'm using a Django admin StackedInline, as follows: class BookInline(admin.StackedInline): model = Book.subject.through verbose_name
I have followed the Django Book up until chapter seven, and I am currently
Hi I am working through the Django book and am up to chapter 7.
In chapter 8 of the Django book there is an example showing a fundamental
I am trying Chapter 6 from Django book. After changing some fields to blank=True,
I'm going through the Django book and I'm currently on chapter 10 . I'm
I'm going through the Django Book. I'm in the middle of Chapter 4. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.