2

Let's say I have this url: localhost/admin/app_name/model_name/. How can I link to this inside my template?

I have already linked the admin page like so

<a href="{% url 'admin:index' %}">Admin</a>

Is there a variant of this I should use?

I'm using 1.5.2

4

1 回答 1

3

您可以按如下方式反转管理列表页面 url:

{% url 'admin:app_model_changelist' %}

对于其他管理页面,请参阅从 Django 文档中反转管理 URL 。

于 2013-09-05T14:00:13.813 回答