Commits

marinho committed 04875a7

Moving MARKUP_CHOICES to settings

  • Participants
  • Parent commits 0010560

Comments (0)

Files changed (3)

File diario/__init__.py

 Blog application for Django projects.
 """
 
-VERSION = (0, 3, 1, 'kamalmaz')
+VERSION = (0, 3, 2, 'kamalmaz')
 
 def get_version():
     """

File diario/models.py

 from django.utils.translation import ugettext_lazy as _
 
 from diario.managers import PublishedManager, CurrentSitePublishedManager
-from diario.settings import DIARIO_DEFAULT_MARKUP_LANG, HAS_TAG_SUPPORT
+from diario.settings import DIARIO_DEFAULT_MARKUP_LANG, HAS_TAG_SUPPORT, MARKUP_CHOICES
 
 
-MARKUP_CHOICES = (
-    ('markdown', 'Markdown'),
-    ('rest',     'reStructuredText'),
-    ('textile',  'Textile'),
-    ('raw',      _('Raw text')),
-)
-
 if HAS_TAG_SUPPORT:
     from tagging.fields import TagField
 

File diario/settings.py

 from django.conf import settings
 from django.core.exceptions import ImproperlyConfigured
 from django.db.models import get_app
+from django.utils.translation import ugettext_lazy as _
 
 #
 #  (!!!)
 #except ImproperlyConfigured:
 HAS_TAG_SUPPORT = getattr(settings, 'HAS_TAG_SUPPORT', False)
 
+MARKUP_CHOICES = getattr(settings, 'DIARIO_MARKUP_CHOICES', (
+        ('markdown', 'Markdown'),
+        ('rest',     'reStructuredText'),
+        ('textile',  'Textile'),
+        ('raw',      _('Raw text')),
+        )
+        )
+