Answer the question
In order to leave comments, you need to log in
How to combine url and created template tag?
There is such a custom template tag for getting Person.id by User.id
def get_user(username):
user = User.objects.get(username__iexact=username)
per = Person.objects.get(user_id=user.id)
perid = per.id
return perid
register.filter('get_user', get_user)
{{user|get_user}}
path('profile/<int:users_id>', views.profileuser, name='profileuser'),
{% url 'index:profileuser' и тут вызвать кастомный темплейт тэг, что бы получить айди персона%}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question