niwinz / django-jinja

Simple and nonobstructive jinja2 integration with Django.
http://niwinz.github.io/django-jinja/latest/
BSD 3-Clause "New" or "Revised" License
363 stars 102 forks source link

Filters doesn't seem to work with jinja-contrib.humanize #172

Closed Sekhmet closed 8 years ago

Sekhmet commented 8 years ago

Hi, I'm kind of new to Django world and I love how Jinja2 works and decided try it. But I got a problem. I want to parse integer with intcomma filter.

I'm not sure whether I'm doing this correctly or not. I created project with PyCharm with Jinja2 as default and Jinja2 is working like a charm, but filters don't.

I've added _humanize to my installed apps but it doesn't change anything.

INSTALLED_APPS = [
    ...
    'django_jinja.contrib._humanize',
]

And I'm using it like this { item.price|intcomma }}

And I'm getting: TemplateSyntaxError at / Invalid filter: 'intcomma'

Running on: Django==1.9.5 django-jinja==2.1.2 Jinja2==2.8 MarkupSafe==0.23

Any ideas? Thanks a lot.

niwinz commented 8 years ago

The () are missing. Take care that jinja filters works a little bit different from the django ;)