If statement django template correct construction
Could someone help me to find the correct way to construct the template in django.
If the view object is edited by moderator (user is not owner) I put into context an object that has permissions as attributes. For example, object.permission_profile is boolean field that allows to edit user-owner profile.
So, in template I suggest I need to use if-statement to put necessary url, one url – when both object exists and permission is True, and another url – if object is not in context.