Permalink
Browse files

Merge pull request #32 from nvie/master

Document `crsf()` helper method.
  • Loading branch information...
2 parents 8a6fe63 + 2d399ab commit 017fbf8f1d39b862165841c0d8e00dbb692b9500 James Socol committed Jan 10, 2013
Showing with 2 additions and 3 deletions.
  1. +1 −3 jingo/__init__.py
  2. +1 −0 jingo/helpers.py
View
@@ -2,10 +2,8 @@
import functools
import imp
import logging
-import warnings
import re
-from django import http
from django.conf import settings
from django.template.base import Origin, TemplateDoesNotExist
from django.template.context import get_standard_processors
@@ -98,7 +96,7 @@ def load_helpers():
return
_helpers_loaded = True
- from jingo import helpers
+ from jingo import helpers # noqa
for app in settings.INSTALLED_APPS:
try:
View
@@ -11,6 +11,7 @@
@register.function
@jinja2.contextfunction
def csrf(context):
+ """Equivalent of Django's ``{% crsf_token %}``."""
return jinja2.Markup(CsrfTokenNode().render(context))

0 comments on commit 017fbf8

Please sign in to comment.