Ensure ugettext is available absolutely everywhere

1
2
3
4
5
6
# Add to __init.py__ in root of your project (same directory 
# as urls.py and settings.py):

from django.utils.translation import ugettext
import __builtin__
__builtin__.__dict__['_'] = ugettext

More like this

  1. Ensure submitted slugs do not conflict with existing resolvable URLs by ElfSternberg 3 years, 11 months ago
  2. Print Exceptions to the Console by ericflo 3 years, 10 months ago
  3. Rails-like environments using Django by ElfSternberg 3 years, 7 months ago
  4. Generate ICalendar Files with django-events by ElfSternberg 2 years, 7 months ago
  5. Generate Google Calendar links from django-event-calendar by ElfSternberg 2 years, 7 months ago

Comments

(Forgotten your password?)