|
|
|
|
@ -5,7 +5,7 @@ from batiskaf.jinja2_ext.thumbnails import thumbnail |
|
|
|
|
from batiskaf.jinja2_ext.cart import cart |
|
|
|
|
from batiskaf.jinja2_ext.html_filters import * |
|
|
|
|
from jinja2 import Environment |
|
|
|
|
from store.models import Category |
|
|
|
|
from store.models import Category, Brand |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def environment(**options): |
|
|
|
|
@ -14,6 +14,7 @@ def environment(**options): |
|
|
|
|
'static': staticfiles_storage.url, |
|
|
|
|
'url': reverse, |
|
|
|
|
'main_categories': Category.objects.filter(parent__isnull=True).order_by('pk'), |
|
|
|
|
'all_brands': Brand.objects.order_by('pk'), |
|
|
|
|
}) |
|
|
|
|
env.filters['linebreaks'] = linebreaks |
|
|
|
|
env.filters['thumbnail'] = thumbnail |
|
|
|
|
|