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. uuid model field by newspire 3 years, 1 month ago
  2. by ago
  3. universal JSONResponse by guetux 10 months ago
  4. Print Exceptions to the Console by ericflo 2 years, 6 months ago
  5. adding fields to User model by diverman 1 year, 6 months ago

Comments

(Forgotten your password?)