Skip to content

Commit

Permalink
added a STATIC_URL template variable that is always '/'. Any static r…
Browse files Browse the repository at this point in the history
…esources (scripts etc) should be prefixed with this rather than assuming that they're at the server root. This will make it a lot easier to migrate to playdoh if/when necessary, since playdoh deployment will likely put those files under a subdirectory like /media/ or /static/.
  • Loading branch information
toolness committed Apr 19, 2012
1 parent 31bffc4 commit 657d6d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vendor/hackasaurus/tinysite.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def handle_file_as_jinja2_template(self, wsgi_env, root_dir, fullpath):
locales = find_locales(self.locale_dir, self.locale_domain,
NULL_LOCALE)
env.globals.update(dict(
STATIC_URL='/',
LOCALE_ROOT="/%s/" % wsgi_env['locale'],
locales=sorted(locales.values()),
current_locale=locales[wsgi_env['locale']]
Expand Down

0 comments on commit 657d6d2

Please sign in to comment.