views:

166

answers:

2

Is there a way to change the url to open the admin site in django? I don't want to use the default /admin url. I am new to django so please try giving a bit more detailed information.

+1  A: 

In urls.py, change the line that reads:

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

to something like:

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

so now instead of http://example.com/admin you'd use http://example.com/new_admin

nbv4
Oh i should have guessed that... thanks a lot ya
Vicky
+1  A: 

Sure, the file urls.py in the root of your project maps URLs to handlers. Just change the line

(r'^admin/', include(admin.site.urls)),

more from Django tutorial

Eric Drechsel
thanks for your help dude
Vicky