1. Discovery Creative
  2. Untitled project
  3. django-disco

Commits

Josh Ourisman  committed b8cdd4b

getting rid of decorator syntax for {% chunk %} templatetag

  • Participants
  • Parent commits 499bf52
  • Branches default

Comments (0)

Files changed (1)

File disco_utils/templatetags/chunky.py

View file
 from disco_utils.models import Chunk
 
 
-@function
 def chunk(slug):
     try:
         chunk = Chunk.objects.get(slug=slug)
         return chunk.text
     except Chunk.DoesNotExist:
         return ''
+chunk.function = True