DT
Size: a a a
DT
ИМ
Y
DT
/profile/<user_id>/
?Y
/profile/<user_id>/
?Y
DT
DT
Y
Y
DT
Y
ИМ
DT
class MyView(..)
def get(self, request, user_id, *args, **kwargs):
context = {
'is_himself': request.user.id == user_id
...
}
...
{% if is_himself %}
<div>кнопка редактировать</div>
{% endif %}
Y
class MyView(..)
def get(self, request, user_id, *args, **kwargs):
context = {
'is_himself': request.user.id == user_id
...
}
...
{% if is_himself %}
<div>кнопка редактировать</div>
{% endif %}
DT
DT
ИМ
WD
ИМ