-1
How to use the tags of the Django templates to create a dynamic link to the admin boards?
Let’s say the name of the admin panel is ProductsAdmin, and that this table was created and registered in the app store. And is available at the following url: /admin/store/products/
I would like to know how to generate a dynamic link to this screen, so avoid putting a link hardcoded in the template.
I tried that way and it didn’t work:
<a href="{% url 'admin:store:products' %}">
Confira os produtos disponíveis
</a>
and the following error message was displayed:
django.urls.exceptions.NoReverseMatch: 'store' is not a registered namespace inside 'admin'
This namespace is not linked the urlspatterns message informs that it did not find in the "urls.py" routes.. path('suaRota/', algumaview.asview(), name="algum_name_defined").. show how your all to see how you can improve the result.
– stack.cardoso