Commits

H3n0xek committed 9f86a3a Merge

Merge with default branch

  • Participants
  • Parent commits a6f3b24, ff2f814
  • Branches newtests

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 _
 
 #
 #  (!!!)
 
 
 # django-tagging support
-try:
-    get_app('tagging')
-    HAS_TAG_SUPPORT = True
-except ImproperlyConfigured:
-    HAS_TAG_SUPPORT = False
+#try:
+#    get_app('tagging')
+#    HAS_TAG_SUPPORT = True
+#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')),
+        )
+        )
+