marinho avatar marinho committed ff2f814

Moving MARKUP_CHOICES to settings

Comments (0)

Files changed (3)

diario/__init__.py

 Blog application for Django projects.
 """
 
-VERSION = (0, 3, 1, 'kamalmaz')
+VERSION = (0, 3, 2, 'kamalmaz')
 
 def get_version():
     """
 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
 

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')),
+        )
+        )
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.