Alex Rivera | Logout

New URL on django admin independent of the apps

Asked 2012-07-02T05:46:46.370
8

I am using django 1.4 and Python 2.7.

I just have a simple requirement where I have to add a new URL to the django admin app. I know how to add URLs which are for the custom apps but am unable figure out how to add URLs which are of the admin app. Please guide me through this.

Basically the full URL should be something like admin/my_url.

UPDATE

I want a way after which I can as well reverse map the URL using admin.

Edit
Report

1 Answer

4

Just put your desired url mapping before the admin mapping in your root urls.py. The first match for the request will be taken, because django goes the url mappings from top to down. Just remember that you don't use an url the admin normally needs or provides because this will never match with a custom mapping in front of it. HTH!

answered 2012-07-02T06:02:00.927

Your Answer