mirror of https://github.com/zulip/zulip.git
Annotate jinja2/__init__.py.
This commit is contained in:
parent
ec910d96fc
commit
a3fd1b5d11
|
@ -1,5 +1,7 @@
|
|||
from __future__ import absolute_import # Python 2 only
|
||||
|
||||
from typing import Any
|
||||
|
||||
from django.contrib.staticfiles.storage import staticfiles_storage
|
||||
from django.template.defaultfilters import slugify, pluralize
|
||||
from django.core.urlresolvers import reverse
|
||||
|
@ -13,11 +15,13 @@ from zerver.templatetags.app_filters import display_list, render_markdown_path
|
|||
|
||||
|
||||
def render_to_response(*args, **kwargs):
|
||||
# type: (*Any, **Any) -> HttpResponse
|
||||
response = render_to_string(*args, **kwargs)
|
||||
return HttpResponse(response)
|
||||
|
||||
|
||||
def environment(**options):
|
||||
# type: (**Any) -> Environment
|
||||
env = Environment(**options)
|
||||
env.globals.update({
|
||||
'static': staticfiles_storage.url,
|
||||
|
|
Loading…
Reference in New Issue