Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Added get_range, custom template tag
Browse files Browse the repository at this point in the history
  • Loading branch information
niklastheman committed Mar 23, 2023
1 parent 3aa3049 commit c9e619a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions customtags/templatetags/get_range.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import template

register = template.Library()


@register.simple_tag
def get_range(start=0, stop=10, step=1):
return range(start, stop, step)

0 comments on commit c9e619a

Please sign in to comment.