31👍
✅
{% if b in request.path %}
hello world!
{% endif %}
If that doesn’t accomplish what you need then move the logic to your view or create a custom template tag.
1👍
Forget request
parameters and use:
{% if 'search_term' in request.GET %}
Hello World!
{% endif %}
- How to load sql fixture in Django for User model?
- Use a django built in filter in code (outside of a template)
- Does changing a django models related_name attribute require a south migration?
- Django – Multiple apps on one webpage?
- How to setup django-compressor on heroku, offline compression to S3
Source:stackexchange.com