Skip to content

Commit

Permalink
removed some of the globals
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Oct 22, 2015
1 parent f2c0567 commit bd722c7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/appier/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,16 +638,6 @@ def add_global_jinja(self, symbol, name, target = None):
_globals = getattr(target, "globals")
_globals[name] = symbol

def add_globals_jinja(self, target = None):
location_f = self.request.location
if self.request.query: location_f += "?" + self.request.query
self.add_global_jinja(self, "own", target = target)
self.add_global_jinja(self.request, "request", target = target)
self.add_global_jinja(self.request.session, "session", target = target)
self.add_global_jinja(self.request.location, "location", target = target)
self.add_global_jinja(location_f, "location_f", target = target)
self.add_global_jinja(config, "config", target = target)

def load_pil(self):
try: import PIL.Image
except: self.pil = None; return
Expand Down Expand Up @@ -1403,7 +1393,6 @@ def template_jinja(
self.jinja.loader.searchpath = search_path
self.jinja.locale = locale
template = self.jinja.get_template(template)
self.add_globals_jinja(target = template)
self.jinja.cache = _cache
return template.render(kwargs)

Expand Down

0 comments on commit bd722c7

Please sign in to comment.