Use {{ request.user.get_profile.whatever }}
. Django’s templating language automatically calls things that are callable – in this case, the .get_profile()
method.
More Related Contents:
- Creating a dynamic choice field
- Performing a getattr() style lookup in a django template
- Django, creating a custom 500/404 error page
- Reference list item by index within Django template?
- django html template can’t find static css and js files
- Django TemplateDoesNotExist?
- How to compare dates in Django templates
- How to call function that takes an argument in a Django template?
- how to iterate through dictionary in a dictionary in django template?
- Iterating through two lists in Django templates
- How do I include image files in Django templates?
- Any way to make {% extends ‘…’ %} conditional? – Django
- NoReverseMatch with keyword argument uidb64 with Django 2.0
- How to make Django slugify work properly with Unicode strings?
- Django: Display Choice Value
- How do I perform query filtering in django templates
- is there a way to loop over two lists simultaneously in django?
- How do I use Django templates without the rest of Django?
- Access request in django custom template tags
- How to redirect with messages to display them in Django Templates?
- How to get the domain name of my site within a Django template?
- matching query does not exist Error in Django
- How do I call a Django function on button click?
- How to put comments in Django templates?
- Sorting related items in a Django template
- Django foreign key relation in template
- How to add multiple arguments to my custom template filter in a django template?
- “{% extends %}” vs “{% include %}” in Django Templates
- How to implement a “back” link on Django Templates?
- Override existing Django Template Tags