add info about templatetags
This commit is contained in:
parent
234c1cff74
commit
47f43ebf2b
|
@ -0,0 +1,19 @@
|
|||
# coding=utf-8
|
||||
|
||||
from django import template
|
||||
|
||||
from wish.models import Wishlist
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@register.filter(is_safe=True)
|
||||
def add_xx(value):
|
||||
return '%sxx' % value
|
||||
|
||||
@register.simple_tag
|
||||
def current_time(format_string):
|
||||
return datetime.datetime.now().strftime(format_string)
|
||||
|
||||
@register.inclusion_tag('wish/templatetags/wishlists_list.html')
|
||||
def wishlists_list():
|
||||
return { 'list': Wishlist.objects.all() }
|
Loading…
Reference in New Issue