NoReverseMatch at /Django,
Убив сутки, я всё таки сдался. Как можно сделать ссылку с уникальным индентификатором?
Ошибка;
Error during template rendering
In template /home/pasteb1n/dev_Software/python/django/Blog/forum/templates/base.html, error at line 2
{% if user.is_authenticated %}
<p align="right"><a href="{% url 'users:profile' name_profile %}"></a>{{ user.username }}</p>
<p align="right"><a href="{% url 'users:logout' %}">Выйти</a></p>
{% else %}
<p align="right">Вы не авторизованы</p>
<p align="right"><a href="{% url 'users:login' %}">Войти</a>
<a href="{% url 'users:register' %}">Зарегистрироваться</a>
</p>
{% endif %}
{% block content %}{% endblock content %}
Остальной код: urls:
path('<str:name_profile>/', views.profile, name='profile')
views:
def profile(request, name_profile):
user_page = User.objects.get(username=name_profile)
return render(request, 'profile.html')