Deployment: make `setup` idempotent and part of `deploy`, automatically install DB...
[fnpdjango.git] / fnpdjango / utils / settings.py
1 """
2 Utilities for global settings.
3 """
4
5
6 class LazyUGettextLazy(object):
7     """You can use it to internationalize strings in settings.
8
9     Just import this class as gettext.
10     """
11     _ = lambda s: s
12     real = False
13
14     def __init__(self, text):
15         self.text = text
16
17     def __unicode__(self):
18         if not self.real:
19             from django.utils.translation import ugettext_lazy
20             LazyUGettextLazy._ = staticmethod(ugettext_lazy)
21             LazyUGettextLazy.real = True
22         return unicode(self._(self.text))
23
24