Skip to content

Instantly share code, notes, and snippets.

@blackrobot
Created October 20, 2009 15:52
Show Gist options
  • Save blackrobot/214364 to your computer and use it in GitHub Desktop.
Save blackrobot/214364 to your computer and use it in GitHub Desktop.
from django.conf import settings
from django.template import add_to_builtins
import django.template.loader
try:
for lib in settings.TEMPLATE_TAGS:
add_to_builtins(lib)
except AttributeError:
pass
from django.utils.translation import ugettext
import __builtin__
__builtin__.__dict__['_'] = ugettext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment