Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing admin site url

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.

like image 829
Vicky Avatar asked Jun 09 '09 05:06

Vicky


People also ask

How do I change my admin URL?

Go under Settings and then click on “Permalinks” and change your URL under “Change wp-admin login”.

Can we change WP admin URL?

Login to your ManageWP Dashboard. In the left navigation menu, click on the site you changed the login URL for. Click “Options”. Change the “Website Admin URL” option from …/wp-admin/ to …/login/ (or whatever you changed it to).

Can you change the URL on a SharePoint site?

Change a site address in the new SharePoint admin center To open the details pane, select the site name. On the General tab, under URL, select Edit. Enter the new site address, and then select Save.


2 Answers

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

like image 95
priestc Avatar answered Sep 30 '22 18:09

priestc


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

like image 45
Eric Drechsel Avatar answered Sep 30 '22 17:09

Eric Drechsel