From 2794734258abd491baae555c53065218633b5ea8 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Fri, 1 Nov 2013 12:26:39 +0100 Subject: [PATCH] remove Jinja2 dependency --- isso/__init__.py | 7 ------- setup.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/isso/__init__.py b/isso/__init__.py index e6bf450..acebb19 100644 --- a/isso/__init__.py +++ b/isso/__init__.py @@ -54,8 +54,6 @@ from werkzeug.wsgi import SharedDataMiddleware from werkzeug.serving import run_simple from werkzeug.contrib.fixers import ProxyFix -from jinja2 import Environment, FileSystemLoader - from isso import db, migrate, views, wsgi from isso.core import ThreadedMixin, uWSGIMixin, Config from isso.utils import parse, http @@ -94,7 +92,6 @@ class Isso(object): self.conf = conf self.db = db.SQLite3(conf.get('general', 'dbpath'), conf) self.signer = URLSafeTimedSerializer(conf.get('general', 'session-key')) - self.j2env = Environment(loader=FileSystemLoader(join(dirname(__file__), 'templates/'))) super(Isso, self).__init__(conf) @@ -109,10 +106,6 @@ class Isso(object): | misaka.EXT_SUPERSCRIPT | misaka.EXT_AUTOLINK \ | misaka.HTML_SKIP_HTML | misaka.HTML_SKIP_IMAGES | misaka.HTML_SAFELINK) - def render(self, tt, **ctx): - tt = self.j2env.get_template(tt) - return tt.render(**ctx) - def dispatch(self, request, start_response): adapter = rules.bind_to_environ(request.environ) try: diff --git a/setup.py b/setup.py index 7d10554..26d904b 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ import sys from setuptools import setup, find_packages -requires = ['Jinja2>=2.7', 'werkzeug>=0.9', 'itsdangerous', 'misaka', 'html5lib'] +requires = ['werkzeug>=0.9', 'itsdangerous', 'misaka', 'html5lib'] if (3, 0) <= sys.version_info < (3, 3): raise SystemExit("Python 3.0, 3.1 and 3.2 are not supported")