I have a little problem with my permissions in my Django template.
I'm trying to show an icon in the menu bar for my project based on permissions. I want to have it so that if the user has permissions to add a new project to the project, he can see the icon, if he does not have this permission, and then not display the link.
The syntax of the syntax follow.add_followupI received from printing user.get_all_permissions().
I tried this code in my template:
...
{% if user.has_perm('followup.add_followup') %}
<li><a href="{% url followup-new p.id %}">Log</a></li>
{% endif %}
...
But when I show the template, this error seems to me:
TemplateSyntaxError at / project / 232 / view /
Failed to parse the remainder: '(followup.add_followup)' from 'user.has_perm (followup.add_followup)'
Any thoughts? It gave me a headache! :)