The philosophy
<https://docs.djangoproject.com/en/3.2/ref/templates/language/#the-django-template-language>
of the Django Template Language wants you "to bear in mind that the Django
template system is not simply Python embedded into HTML".
My solution should be to add user_id to the context data as
current_user_id, your comparison is then simply {% if user.id ==
current_user_id %}.
Op ma 5 jul. 2021 om 20:40 schreef sum abiut <[email protected]>:
> Try this:
>
> {% if user.id == url ' message' user.id % }
>
> <h3>active</h3>
> {% endif %}
>
> On Tue, Jul 6, 2021 at 12:55 AM Saifullah Shahen <[email protected]>
> wrote:
>
>> I am facing a problem with a dynamic URL. So how can I use in dynamic URL
>> in template conditions where there has many person's id.
>>
>>
>> [image: asa.PNG]
>> [image: asa.PNG]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django REST framework" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-rest-framework/de94bd89-f5f1-4743-b967-398d893d83e7n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-rest-framework/de94bd89-f5f1-4743-b967-398d893d83e7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-rest-framework/CAPCf-y6Ah5pp4JpBRjciG1fkRPhYUrYs_NAskSn%2B3L2kjXhYSA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-rest-framework/CAPCf-y6Ah5pp4JpBRjciG1fkRPhYUrYs_NAskSn%2B3L2kjXhYSA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
--
[email protected]
06-1511 8153
KvK-nummer: 56685149
Btw-nummer: NL203949365B01
Bankrekening: NL12 BUNQ 2290 0564 56
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-rest-framework/CACef1p28%3DPzyzEU%2BvgUjDmu3Nfk4Z00aWTv%2BFQppWMeTHRfexQ%40mail.gmail.com.