81👍
✅
You can use the template filter length:
{{ articles|length }}
will display the length of articles list.
- [Django]-Django DoesNotExist
- [Django]-Django is_staff permission decorator
- [Django]-How do I install psycopg2 for Python 3.x?
3👍
The count()
method gets the number of items retrieved by the queryset it is called on.
- [Django]-Django form with choices but also with freetext option?
- [Django]-How to format dateTime in django template?
- [Django]-Django: multiple models in one template using forms
Source:stackexchange.com