root / pithos / settings.py.dist @ 83b4c5fa
History | View | Annotate | Download (5.6 kB)
1 | 5635f9ef | Antony Chazapis | # Copyright 2011 GRNET S.A. All rights reserved. |
---|---|---|---|
2 | 5635f9ef | Antony Chazapis | # |
3 | 5635f9ef | Antony Chazapis | # Redistribution and use in source and binary forms, with or |
4 | 5635f9ef | Antony Chazapis | # without modification, are permitted provided that the following |
5 | 5635f9ef | Antony Chazapis | # conditions are met: |
6 | 5635f9ef | Antony Chazapis | # |
7 | 5635f9ef | Antony Chazapis | # 1. Redistributions of source code must retain the above |
8 | 5635f9ef | Antony Chazapis | # copyright notice, this list of conditions and the following |
9 | 5635f9ef | Antony Chazapis | # disclaimer. |
10 | 5635f9ef | Antony Chazapis | # |
11 | 5635f9ef | Antony Chazapis | # 2. Redistributions in binary form must reproduce the above |
12 | 5635f9ef | Antony Chazapis | # copyright notice, this list of conditions and the following |
13 | 5635f9ef | Antony Chazapis | # disclaimer in the documentation and/or other materials |
14 | 5635f9ef | Antony Chazapis | # provided with the distribution. |
15 | 5635f9ef | Antony Chazapis | # |
16 | 5635f9ef | Antony Chazapis | # THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS |
17 | 5635f9ef | Antony Chazapis | # OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | 5635f9ef | Antony Chazapis | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
19 | 5635f9ef | Antony Chazapis | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR |
20 | 5635f9ef | Antony Chazapis | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
21 | 5635f9ef | Antony Chazapis | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
22 | 5635f9ef | Antony Chazapis | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
23 | 5635f9ef | Antony Chazapis | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
24 | 5635f9ef | Antony Chazapis | # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
25 | 5635f9ef | Antony Chazapis | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
26 | 5635f9ef | Antony Chazapis | # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
27 | 5635f9ef | Antony Chazapis | # POSSIBILITY OF SUCH DAMAGE. |
28 | 5635f9ef | Antony Chazapis | # |
29 | 5635f9ef | Antony Chazapis | # The views and conclusions contained in the software and |
30 | 5635f9ef | Antony Chazapis | # documentation are those of the authors and should not be |
31 | 5635f9ef | Antony Chazapis | # interpreted as representing official policies, either expressed |
32 | 5635f9ef | Antony Chazapis | # or implied, of GRNET S.A. |
33 | 5635f9ef | Antony Chazapis | |
34 | b956618e | Antony Chazapis | # Django settings for pithos project. |
35 | b956618e | Antony Chazapis | import os |
36 | b956618e | Antony Chazapis | |
37 | b956618e | Antony Chazapis | PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' |
38 | b956618e | Antony Chazapis | |
39 | b956618e | Antony Chazapis | DEBUG = True |
40 | b956618e | Antony Chazapis | TEMPLATE_DEBUG = DEBUG |
41 | b956618e | Antony Chazapis | |
42 | b956618e | Antony Chazapis | # A quick-n-dirty way to know if we're running unit tests |
43 | b956618e | Antony Chazapis | import sys |
44 | b956618e | Antony Chazapis | TEST = False |
45 | b956618e | Antony Chazapis | if len(sys.argv) >= 2: |
46 | b956618e | Antony Chazapis | if os.path.basename(sys.argv[0]) == 'manage.py' and \ |
47 | b956618e | Antony Chazapis | (sys.argv[1] == 'test' or sys.argv[1] == 'hudson'): |
48 | b956618e | Antony Chazapis | TEST = True |
49 | b956618e | Antony Chazapis | |
50 | b956618e | Antony Chazapis | ADMINS = ( |
51 | b956618e | Antony Chazapis | # ('Your Name', 'your_email@domain.com'), |
52 | b956618e | Antony Chazapis | ) |
53 | b956618e | Antony Chazapis | |
54 | b956618e | Antony Chazapis | MANAGERS = ADMINS |
55 | b956618e | Antony Chazapis | |
56 | b956618e | Antony Chazapis | DATABASES = { |
57 | b956618e | Antony Chazapis | 'default': { |
58 | b956618e | Antony Chazapis | 'ENGINE': 'sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. |
59 | b956618e | Antony Chazapis | 'NAME': PROJECT_PATH + 'pithos.db', # Or path to database file if using sqlite3. |
60 | b956618e | Antony Chazapis | 'USER': '', # Not used with sqlite3. |
61 | b956618e | Antony Chazapis | 'PASSWORD': '', # Not used with sqlite3. |
62 | b956618e | Antony Chazapis | 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
63 | b956618e | Antony Chazapis | 'PORT': '', # Set to empty string for default. Not used with sqlite3. |
64 | b956618e | Antony Chazapis | } |
65 | b956618e | Antony Chazapis | } |
66 | b956618e | Antony Chazapis | |
67 | b956618e | Antony Chazapis | # The backend to use and its initilization options. |
68 | b956618e | Antony Chazapis | if TEST: |
69 | a156c8b3 | Antony Chazapis | BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/test/'),)) |
70 | b956618e | Antony Chazapis | else: |
71 | a156c8b3 | Antony Chazapis | BACKEND = ('SimpleBackend', (os.path.join(PROJECT_PATH, 'data/pithos/'),)) |
72 | b956618e | Antony Chazapis | |
73 | b956618e | Antony Chazapis | # Local time zone for this installation. Choices can be found here: |
74 | b956618e | Antony Chazapis | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
75 | b956618e | Antony Chazapis | # although not all choices may be available on all operating systems. |
76 | b956618e | Antony Chazapis | # On Unix systems, a value of None will cause Django to use the same |
77 | b956618e | Antony Chazapis | # timezone as the operating system. |
78 | b956618e | Antony Chazapis | # If running in a Windows environment this must be set to the same as your |
79 | b956618e | Antony Chazapis | # system time zone. |
80 | b956618e | Antony Chazapis | TIME_ZONE = 'UTC' |
81 | b956618e | Antony Chazapis | |
82 | b956618e | Antony Chazapis | # Language code for this installation. All choices can be found here: |
83 | b956618e | Antony Chazapis | # http://www.i18nguy.com/unicode/language-identifiers.html |
84 | b956618e | Antony Chazapis | LANGUAGE_CODE = 'en-us' |
85 | b956618e | Antony Chazapis | |
86 | b956618e | Antony Chazapis | SITE_ID = 1 |
87 | b956618e | Antony Chazapis | |
88 | b956618e | Antony Chazapis | # If you set this to False, Django will make some optimizations so as not |
89 | b956618e | Antony Chazapis | # to load the internationalization machinery. |
90 | b956618e | Antony Chazapis | USE_I18N = True |
91 | b956618e | Antony Chazapis | |
92 | b956618e | Antony Chazapis | # If you set this to False, Django will not format dates, numbers and |
93 | b956618e | Antony Chazapis | # calendars according to the current locale |
94 | b956618e | Antony Chazapis | USE_L10N = True |
95 | b956618e | Antony Chazapis | |
96 | b956618e | Antony Chazapis | # Absolute filesystem path to the directory that will hold user-uploaded files. |
97 | b956618e | Antony Chazapis | # Example: "/home/media/media.lawrence.com/" |
98 | b956618e | Antony Chazapis | MEDIA_ROOT = '' |
99 | b956618e | Antony Chazapis | |
100 | b956618e | Antony Chazapis | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
101 | b956618e | Antony Chazapis | # trailing slash if there is a path component (optional in other cases). |
102 | b956618e | Antony Chazapis | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
103 | b956618e | Antony Chazapis | MEDIA_URL = '' |
104 | b956618e | Antony Chazapis | |
105 | b956618e | Antony Chazapis | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
106 | b956618e | Antony Chazapis | # trailing slash. |
107 | b956618e | Antony Chazapis | # Examples: "http://foo.com/media/", "/media/". |
108 | b956618e | Antony Chazapis | ADMIN_MEDIA_PREFIX = '/media/' |
109 | b956618e | Antony Chazapis | |
110 | b956618e | Antony Chazapis | # Make this unique, and don't share it with anybody. |
111 | b956618e | Antony Chazapis | SECRET_KEY = '$j0cdrfm*0sc2j+e@@2f-&3-_@2=^!z#+b-8o4_i10@2%ev7si' |
112 | b956618e | Antony Chazapis | |
113 | b956618e | Antony Chazapis | # List of callables that know how to import templates from various sources. |
114 | b956618e | Antony Chazapis | TEMPLATE_LOADERS = ( |
115 | b956618e | Antony Chazapis | 'django.template.loaders.filesystem.Loader', |
116 | b956618e | Antony Chazapis | 'django.template.loaders.app_directories.Loader', |
117 | b956618e | Antony Chazapis | # 'django.template.loaders.eggs.Loader', |
118 | b956618e | Antony Chazapis | ) |
119 | b956618e | Antony Chazapis | |
120 | b956618e | Antony Chazapis | MIDDLEWARE_CLASSES = ( |
121 | b956618e | Antony Chazapis | 'django.middleware.common.CommonMiddleware', |
122 | b956618e | Antony Chazapis | 'django.contrib.sessions.middleware.SessionMiddleware', |
123 | b956618e | Antony Chazapis | # 'django.middleware.csrf.CsrfViewMiddleware', |
124 | b956618e | Antony Chazapis | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
125 | b956618e | Antony Chazapis | 'django.contrib.messages.middleware.MessageMiddleware', |
126 | aa4fac11 | Giorgos Verigakis | 'pithos.middleware.LoggingConfigMiddleware', |
127 | aa4fac11 | Giorgos Verigakis | 'pithos.api.auth.DummyAuthMiddleware' |
128 | b956618e | Antony Chazapis | ) |
129 | b956618e | Antony Chazapis | |
130 | b956618e | Antony Chazapis | ROOT_URLCONF = 'pithos.urls' |
131 | b956618e | Antony Chazapis | |
132 | b956618e | Antony Chazapis | TEMPLATE_DIRS = ( |
133 | b956618e | Antony Chazapis | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
134 | b956618e | Antony Chazapis | # Always use forward slashes, even on Windows. |
135 | b956618e | Antony Chazapis | # Don't forget to use absolute paths, not relative paths. |
136 | b956618e | Antony Chazapis | ) |
137 | b956618e | Antony Chazapis | |
138 | b956618e | Antony Chazapis | INSTALLED_APPS = ( |
139 | b956618e | Antony Chazapis | 'django.contrib.auth', |
140 | b956618e | Antony Chazapis | 'django.contrib.contenttypes', |
141 | b956618e | Antony Chazapis | 'django.contrib.sessions', |
142 | b956618e | Antony Chazapis | 'django.contrib.sites', |
143 | b956618e | Antony Chazapis | 'django.contrib.messages', |
144 | b956618e | Antony Chazapis | # 'django.contrib.admin', |
145 | b956618e | Antony Chazapis | # 'django.contrib.admindocs', |
146 | 502687d0 | Antony Chazapis | 'pithos.api', |
147 | 502687d0 | Antony Chazapis | 'pithos.public' |
148 | b956618e | Antony Chazapis | ) |
149 | aa4fac11 | Giorgos Verigakis | |
150 | aa4fac11 | Giorgos Verigakis | AUTH_TOKENS = { |
151 | aa4fac11 | Giorgos Verigakis | '0000': 'test', |
152 | aa4fac11 | Giorgos Verigakis | '0001': 'verigak', |
153 | aa4fac11 | Giorgos Verigakis | '0002': 'chazapis', |
154 | aa4fac11 | Giorgos Verigakis | '0003': 'gtsouk', |
155 | aa4fac11 | Giorgos Verigakis | '0004': 'papagian', |
156 | aa4fac11 | Giorgos Verigakis | '0005': 'louridas', |
157 | aa4fac11 | Giorgos Verigakis | '0006': 'chstath', |
158 | ec988bd5 | Giorgos Verigakis | '0007': 'pkanavos', |
159 | ec988bd5 | Giorgos Verigakis | '0008': 'mvasilak'} |