Skip to content

Commit

Permalink
Version bump and deprecate .render()
Browse files Browse the repository at this point in the history
  • Loading branch information
davedash committed Oct 24, 2011
1 parent 83632c0 commit 844acb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
18 changes: 5 additions & 13 deletions jingo/__init__.py
Expand Up @@ -9,11 +9,10 @@
from django.template.context import get_standard_processors
from django.template.loader import BaseLoader
from django.utils.importlib import import_module
from django.utils.translation import trans_real

import jinja2

VERSION = (0, 3)
VERSION = (0, 4)
__version__ = '.'.join(map(str, VERSION))

log = logging.getLogger('jingo')
Expand Down Expand Up @@ -67,18 +66,11 @@ def get_env():

def render(request, template, context=None, **kwargs):
"""
Shortcut like Django's ``render_to_response``, but better.
Minimal usage, with only a request object and a template name::
return jingo.render(request, 'template.html')
With template context and keywords passed to
:class:`django.http.HttpResponse`::
return jingo.render(request, 'template.html',
{'some_var': 42}, status=209)
.. deprecated:: 0.4
use ``django.shortcuts.render()``
"""
log.warning('jingo.render() has been deprecated. '
'Use django.shortcuts.render().')
rendered = render_to_string(request, template, context)
return http.HttpResponse(rendered, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -3,7 +3,7 @@

setup(
name='jingo',
version='0.3',
version='0.4',
description='An adapter for using Jinja2 templates with Django.',
long_description=open('README.rst').read(),
author='Jeff Balogh',
Expand Down

0 comments on commit 844acb5

Please sign in to comment.