Reputation: 11
i have just started using django, and I keep getting this error now. Also not sure how I can give an additional parameter to the view (url for example).
Will appreciate any help
In urls.py
path('page/<path:url>', TemplateView.as_view(template_name='pages/page.html'))
<a class="dropdown-item" href="{% url 'channels:page' post.url %}" target="_blank">
Upvotes: 0
Views: 155
Reputation: 733
just add name='page'
to your path to make a call in reverse
path('page/', TemplateView.as_view(template_name='pages/page.html'), name='page')
Upvotes: 3