Commits

catapela  committed debd4d6

0.4.9.2 dl_settings removed

  • Participants
  • Parent commits cfecaf7

Comments (0)

Files changed (4)

File src/dynamicLink/presettings.py

 from django.conf import settings
 from django.utils.translation import ugettext_lazy as _
 
+# This file holds the presettings of the app. 
+
 # A path to a directory from witch walk down so you can choose your files.
-DYNAMIC_LINK_MEDIA = settings.MEDIA_ROOT
+try:
+    DYNAMIC_LINK_MEDIA = settings.DYNAMIC_LINK_MEDIA
+except AttributeError:
+    # our presetting
+    DYNAMIC_LINK_MEDIA = settings.MEDIA_ROOT
 
 # A string that modify the serve url path:
 # /www.example.com/DYNAMIC_LINK_URL_BASE_COMPONENT/link/3839hd8HKl3/example.zip
-DYNAMIC_LINK_URL_BASE_COMPONENT = 'serve'
+try:
+    DYNAMIC_LINK_URL_BASE_COMPONENT = settings.DYNAMIC_LINK_URL_BASE_COMPONENT
+except AttributeError:
+    # our presetting
+    DYNAMIC_LINK_URL_BASE_COMPONENT = 'serve'
+
 
 # It's here because of not violate the DRY priciple.
 TEXT_REQUEST_DOES_NOT_EXIST = _(u'This request is faulty')
-TEXT_REQUEST_IS_EXPIRED = _(u'Sorry, this request is already expired')
-
-# Look for data that overwrite the defaults
-# - variables from dl_settigns.py overwrite thus from settings and form presettings
-# - variables from settings.py overwrite thus form presettings
-# As you see it can't be used both at once. Settings.py is only used if there
-# is no dl_settings.py
-try:
-    from dl_settings import *
-except ImportError:
-    try:
-        from settings import DYNAMIC_LINK_URL_BASE_COMPONENT
-    except ImportError:
-        pass
-    try:
-        from settings import DYNAMIC_LINK_MEDIA
-    except ImportError:
-        pass
+TEXT_REQUEST_IS_EXPIRED = _(u'Sorry, this request is already expired')

File src/dynamicLink/presettings.pyc

Binary file modified.

File src/dynamicLink/version.py

 # -*- coding:utf-8 -*-
 # This Python file uses the following encoding: utf-8
 
-VERSION = (0,4,9)
+VERSION = (0,4,9.2)
 APPLICATION_NAME = "Dynamic Link"
 VERSION_str = str(VERSION).strip('()').replace(',','.').replace(' ','')
 VERSION_INFO = """
 Hints:
 
 
+- 0.4.9.2   dl_settings removed
 - 0.4.9.1   Readme updatet
 - 0.4.9     Testet with Django 1.2 u. 1.3
 - 0.4.8.4   Some small changes

File src/dynamicLink/version.pyc

Binary file modified.