niwinz / django-jinja

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

add None value for cache extension #274

Closed romanyakovlev closed 3 years ago

romanyakovlev commented 3 years ago

As Django docs said The fragment is cached forever if timeout is None. However when I set timeout to None get this error: "cache" tag got a non-integer timeout value: None. So I made a little fix.

wizpig64 commented 3 years ago

It looks like this change is much like the one in django 2.0 from four years ago, that allowed a None timeout:

So this gets approval from me. I contributed a test and added a line in the changelog.

wizpig64 commented 3 years ago

hmm, i thought that doing it that way would have merged [and closed] this PR as well, but maybe it didn't because the merge was done with a rebase. @auvipy could you merge or close this?

auvipy commented 3 years ago

the commit is merged