1👍
You should use admin namespace, like written in the docs. You could also look on other admin urls in that namespace.
{% url 'admin:index' %}
1👍
Use admin:index
if you want to have an url to /admin/
site.
If you install django-extensions you can use ./manage.py show_urls
to get the list of urls for your app
- [Django]-Is there a better way to check if the values of an AJAX request are valid?
- [Django]-Django: Limit to size of database-backed sessions?
- [Django]-Django – why is this hitting the database twice
1👍
Set admin url in your project urls.py, same folder as your settings.py
Url(r'^admin/', admin.site.urls),
Then call it in your template:
<a href="{% url 'admin:index' %} > link </a>
Source:stackexchange.com