Discussion:
[SCM] UNNAMED PROJECT branch, master, updated. b86f5e4c1d8f5e6c2598b1bb5c4e6af3df458981
Michal Cihar
2012-04-02 09:51:11 UTC
Permalink
The following commit has been merged in the master branch:
commit b86f5e4c1d8f5e6c2598b1bb5c4e6af3df458981
Author: Michal Čihař <***@cihar.com>
Date: Mon Apr 2 11:41:31 2012 +0200

Cleanup config file

diff --git a/settings.py b/settings.py
index ec21c65..ac5bc11 100644
--- a/settings.py
+++ b/settings.py
@@ -1,7 +1,7 @@
# Django settings for wammu website project.
# -*- coding: UTF-8 -*-

-from socket import gethostname
+import os

DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -24,6 +24,8 @@ DATABASES = {
}
}

+WEB_ROOT = os.path.dirname(os.path.abspath(__file__))
+
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
@@ -41,33 +43,50 @@ SITE_ID = 1
# to load the internationalization machinery.
USE_I18N = True

-HOSTNAME = gethostname()
-if HOSTNAME == 'rincewind':
- WEB_ROOT = '/home/mcihar/private/wammu_web/'
-elif HOSTNAME == 'raptor':
- WEB_ROOT = '/home/nijel/work/gammu/wammu_web/'
-elif HOSTNAME == 'nutt':
- WEB_ROOT = '/home/nijel/gammu/wammu_web/'
-elif HOSTNAME == 'web':
- WEB_ROOT = '/var/lib/django/wammu_web/'
-else:
- WEB_ROOT = '/home/nijel/work/gammu/wammu_web/'
-
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
+# If you set this to False, Django will not format dates, numbers and
+# calendars according to the current locale
+USE_L10N = True
+
+# Absolute filesystem path to the directory that will hold user-uploaded files.
+# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = '%s/media/' % WEB_ROOT

HTML_ROOT= '%s/html/' % WEB_ROOT

# 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/"
+# trailing slash.
+# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/'

-# 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 = '/admin-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/'
+
+# URL prefix for admin static files -- CSS, JavaScript and images.
+# Make sure to use a trailing slash.
+# Examples: "http://foo.com/static/admin/", "/static/admin/".
+ADMIN_MEDIA_PREFIX = '/static/admin/'
+
+# 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 = 'c=kt_6vtz&(418w-0(uti(q5&e76q#lc=%vuwzm&+ulqrkgyp3'
--
UNNAMED PROJECT
Loading...