catapela avatar catapela committed a9bc666

settings.py in example project modified. Now it should work correct with Django 1.4

Comments (0)

Files changed (3)

dynamicLink/__init__.py

     part1 = 'Warning! "django-dynamic-link %s" (use: "dynamicLink.VERSION") is not ' \
             'tested with "Django %s". May it runs with it may not! ' \
             'With the installed django-dynamic-link is "Django %s" recommended. ' \
-            % str(version.VERSION), (str(django.VERSION), strform(greatest_dlv), strform(greatest_dlv))
+            % (str(version.VERSION), str(django.VERSION), strform(greatest_dlv))
     part2 = 'Use "pip install django==%s.X". or downgrade django-dynamic-link. ' \
             % strform(greatest_dlv)
     part3 = 'Use "pip install django==%s.X" or try "pip install --upgrade django-dynamic-link". ' \

dynamicLink/version.py

 # -*- coding:utf-8 -*-
 # This Python file uses the following encoding: utf-8
 
-VERSION = (0,5,6,1)
+VERSION = (0,5,6,2)
 RELEASE_DJANGO = ((1,2),(1,3),(1,4))
 PYTHON_MIN = (2,4)
 REQUIRES ="""
 Modification date: 03.08.2011
 
 Hints:
+- 0.5.6.2   settings.py in example project modified. Now it should work correct with Django 1.4
 - 0.5.6.1   Timezone bug changes
 - 0.5.6     Example Project runs with Django 1.4
 - 0.5.5     dynamicLink.CKISNT() function added.

example/settings.py

-# Django settings for example project.
+# Django settings for plain_14 project.
 
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
 ADMINS = (
-    # ('Your Name', 'your_email@domain.com'),
+    # ('Your Name', 'your_email@example.com'),
 )
 
 MANAGERS = ADMINS
 # system time zone.
 TIME_ZONE = 'America/Chicago'
 
-# Avalible (natural) laguages in this project
-LANGUAGES = (
-             ('en', 'English'),
-             ('de', 'Deutsch'),
-             )
-
 # Language code for this installation. All choices can be found here:
 # http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'en'
+LANGUAGE_CODE = 'en-us'
 
 SITE_ID = 1
 
 USE_I18N = True
 
 # If you set this to False, Django will not format dates, numbers and
-# calendars according to the current locale
+# calendars according to the current locale.
 USE_L10N = True
 
+# If you set this to False, Django will not use timezone-aware datetimes.
+USE_TZ = True
+
 # Absolute filesystem path to the directory that will hold user-uploaded files.
-# Example: "/home/media/media.lawrence.com/"
+# Example: "/home/media/media.lawrence.com/media/"
 MEDIA_ROOT = os.path.join(SITECODE_DIRECTORY_PATH, 'media')
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
-# trailing slash if there is a path component (optional in other cases).
-# Examples: "http://media.lawrence.com", "http://example.com/media/"
-MEDIA_URL = 'sitemedia/'
+# trailing slash.
+# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
+MEDIA_URL = ''
 
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/home/media/media.lawrence.com/static/"
+STATIC_ROOT = ''
+
+# URL prefix for static files.
+# Example: "http://media.lawrence.com/static/"
+STATIC_URL = '/static/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (
+    # Put strings here, like "/home/html/static" or "C:/www/django/static".
+    # Always use forward slashes, even on Windows.
+    # Don't forget to use absolute paths, not relative paths.
+)
+
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+    'django.contrib.staticfiles.finders.FileSystemFinder',
+    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
+)
 
 # Make this unique, and don't share it with anybody.
-SECRET_KEY = 'skd9^9qd6a#n*kkf7dv)8l6vzj=#irc64-!9fn=$_^^ty$g3vl'
+SECRET_KEY = 'uae%nqxseg8jji!!g-tezz1!ci)pp3^qcl2'
 
 # List of callables that know how to import templates from various sources.
 TEMPLATE_LOADERS = (
 MIDDLEWARE_CLASSES = (
     'django.middleware.common.CommonMiddleware',
     'django.contrib.sessions.middleware.SessionMiddleware',
-
-    'django.middleware.locale.LocaleMiddleware', # is needet for django-dynamic-link
-
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
+    # Uncomment the next line for simple clickjacking protection:
+    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    'django.middleware.locale.LocaleMiddleware', # is needet for django-dynamic-link
 )
 
 ROOT_URLCONF = 'example.urls'
 
+# Python dotted path to the WSGI application used by Django's runserver.
+#WSGI_APPLICATION = 'plain_14.wsgi.application'
+
 TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
-    'django.contrib.messages',
-
+    #'django.contrib.messages',
+    #'django.contrib.staticfiles',
     # Uncomment the next line to enable the admin:
     'django.contrib.admin', # is needet for django-dynamic-link
-
     # Uncomment the next line to enable admin documentation:
     'django.contrib.admindocs',
     'dynamicLink', # is needet for django-dynamic-link
 )
+
+# A sample logging configuration. The only tangible logging
+# performed by this configuration is to send an email to
+# the site admins on every HTTP 500 error when DEBUG=False.
+# See http://docs.djangoproject.com/en/dev/topics/logging for
+# more details on how to customize your logging configuration.
+LOGGING = {
+    'version': 1,
+    'disable_existing_loggers': False,
+    'filters': {
+        'require_debug_false': {
+            '()': 'django.utils.log.RequireDebugFalse'
+        }
+    },
+    'handlers': {
+        'mail_admins': {
+            'level': 'ERROR',
+            'filters': ['require_debug_false'],
+            'class': 'django.utils.log.AdminEmailHandler'
+        }
+    },
+    'loggers': {
+        'django.request': {
+            'handlers': ['mail_admins'],
+            'level': 'ERROR',
+            'propagate': True,
+        },
+    }
+}
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.