I’ve used a simple technique that works nicely for small cases with no special tags and no additional context. Sometimes this comes in handy
{% for i in '0123456789'|make_list %}
{{ forloop.counter }}
{% endfor %}
More Related Contents:
- Can I access constants in settings.py from templates in Django?
- How to add url parameters to Django template url tag?
- How to concatenate strings in django templates?
- How can I change the default Django date template format?
- Applying bootstrap styles to django forms
- Need to convert a string to int in a django template
- Use variable as dictionary key in Django template
- Variable subtraction in django templates
- How to set a value of a variable inside a template code?
- Django – iterate number in for loop of a template
- What is a context in Django?
- Django: How do I add arbitrary html attributes to input fields on a form?
- How do I add multiple arguments to my custom template filter in a django template?
- Get list item dynamically in django templates
- Django templates – split string to array
- Add class to form field Django ModelForm
- Access kwargs from a URL in a Django template
- Django templates: value of dictionary key with a space in it
- Django – Simple custom template tag example
- Grouped CheckboxSelectMultiple in Django template
- How to access outermost forloop.counter with nested for loops in Django templates?
- Django templates: verbose version of a choice
- How to get URL of current page, including parameters, in a template?
- {% include %} vs {% extends %} in django templates
- How to use if/else condition on Django Templates?
- How to iterate over nested dictionaries in django templates
- Django templates folders
- Get type of Django form widget from within template
- How do you limit list objects template side, rather than view side
- Django template {%for%} tag add li every 4th element