Révision 333a39ca
Ajouté par Benjamin Dauvergne il y a plus de 11 ans
.gitignore | ||
---|---|---|
32 | 32 |
|
33 | 33 |
# Django files |
34 | 34 |
local_settings.py |
35 |
aps42.sqlite3 |
|
35 |
calebasse.sqlite3 |
MANIFEST.in | ||
---|---|---|
1 | 1 |
include README INSTALL LICENSE AUTHORS |
2 | 2 |
recursive-include mockups * |
3 |
recursive-include aps42/*/static * |
|
4 |
recursive-include aps42/*/templates * |
|
3 |
recursive-include calebasse/*/static * |
|
4 |
recursive-include calebasse/*/templates * |
aps42/a42base/models.py | ||
---|---|---|
1 |
from django.db import models |
|
2 |
|
|
3 |
# Create your models here. |
aps42/a42base/models/__init__.py | ||
---|---|---|
1 |
from actes import * |
aps42/a42base/models/actes.py | ||
---|---|---|
1 |
from django.db import Model |
|
2 |
|
|
3 |
class Exemple(Model): |
|
4 |
|
|
5 |
class Meta: |
|
6 |
app_label = 'a42base' |
aps42/a42base/tests.py | ||
---|---|---|
1 |
""" |
|
2 |
This file demonstrates writing tests using the unittest module. These will pass |
|
3 |
when you run "manage.py test". |
|
4 |
|
|
5 |
Replace this with more appropriate tests for your application. |
|
6 |
""" |
|
7 |
|
|
8 |
from django.test import TestCase |
|
9 |
|
|
10 |
|
|
11 |
class SimpleTest(TestCase): |
|
12 |
def test_basic_addition(self): |
|
13 |
""" |
|
14 |
Tests that 1 + 1 always equals 2. |
|
15 |
""" |
|
16 |
self.assertEqual(1 + 1, 2) |
aps42/a42base/views.py | ||
---|---|---|
1 |
# Create your views here. |
aps42/settings/__init__.py | ||
---|---|---|
1 |
import os.path |
|
2 |
|
|
3 |
PROJECT_PATH = os.path.dirname(os.path.dirname(__file__)) |
|
4 |
|
|
5 |
from django import * |
|
6 |
from aps42 import * |
|
7 |
|
|
8 |
######################################################################### |
|
9 |
# Import settings from local_settings.py, if it exists. |
|
10 |
# |
|
11 |
# Put this at the end of settings.py |
|
12 |
|
|
13 |
try: |
|
14 |
import local_settings |
|
15 |
except ImportError: |
|
16 |
print """ |
|
17 |
------------------------------------------------------------------------- |
|
18 |
You need to create a local_settings.py file which needs to contain at least |
|
19 |
database connection information. |
|
20 |
|
|
21 |
Copy local_settings_example.py to local_settings.py and edit it. |
|
22 |
------------------------------------------------------------------------- |
|
23 |
""" |
|
24 |
import sys |
|
25 |
sys.exit(1) |
|
26 |
else: |
|
27 |
# Import any symbols that begin with A-Z. Append to lists any symbols that |
|
28 |
# begin with "EXTRA_". |
|
29 |
import re |
|
30 |
for attr in dir(local_settings): |
|
31 |
match = re.search('^EXTRA_(\w+)', attr) |
|
32 |
if match: |
|
33 |
name = match.group(1) |
|
34 |
value = getattr(local_settings, attr) |
|
35 |
try: |
|
36 |
globals()[name] += value |
|
37 |
except KeyError: |
|
38 |
globals()[name] = value |
|
39 |
elif re.search('^[A-Z]', attr): |
|
40 |
globals()[attr] = getattr(local_settings, attr) |
aps42/settings/django.py | ||
---|---|---|
1 |
# Django settings for aps42 project. |
|
2 |
|
|
3 |
import os |
|
4 |
|
|
5 |
from ..settings import PROJECT_PATH |
|
6 |
|
|
7 |
DEBUG = True |
|
8 |
TEMPLATE_DEBUG = DEBUG |
|
9 |
|
|
10 |
ADMINS = ( |
|
11 |
# ('Your Name', 'your_email@example.com'), |
|
12 |
) |
|
13 |
|
|
14 |
MANAGERS = ADMINS |
|
15 |
|
|
16 |
DATABASES = { |
|
17 |
'default': { |
|
18 |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
19 |
'NAME': os.path.join(PROJECT_PATH, 'aps42.sqlite3'), # Or path to database file if using sqlite3. |
|
20 |
'USER': '', # Not used with sqlite3. |
|
21 |
'PASSWORD': '', # Not used with sqlite3. |
|
22 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
23 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
24 |
} |
|
25 |
} |
|
26 |
|
|
27 |
# Local time zone for this installation. Choices can be found here: |
|
28 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
29 |
# although not all choices may be available on all operating systems. |
|
30 |
# On Unix systems, a value of None will cause Django to use the same |
|
31 |
# timezone as the operating system. |
|
32 |
# If running in a Windows environment this must be set to the same as your |
|
33 |
# system time zone. |
|
34 |
TIME_ZONE = 'Europe/Paris' |
|
35 |
|
|
36 |
# Language code for this installation. All choices can be found here: |
|
37 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
38 |
LANGUAGE_CODE = 'fr-fr' |
|
39 |
|
|
40 |
SITE_ID = 1 |
|
41 |
|
|
42 |
# If you set this to False, Django will make some optimizations so as not |
|
43 |
# to load the internationalization machinery. |
|
44 |
USE_I18N = True |
|
45 |
|
|
46 |
# If you set this to False, Django will not format dates, numbers and |
|
47 |
# calendars according to the current locale. |
|
48 |
USE_L10N = True |
|
49 |
|
|
50 |
# If you set this to False, Django will not use timezone-aware datetimes. |
|
51 |
USE_TZ = True |
|
52 |
|
|
53 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
54 |
# Example: "/home/media/media.lawrence.com/media/" |
|
55 |
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') |
|
56 |
|
|
57 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
58 |
# trailing slash. |
|
59 |
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
60 |
MEDIA_URL = '/media/' |
|
61 |
|
|
62 |
# Absolute path to the directory static files should be collected to. |
|
63 |
# Don't put anything in this directory yourself; store your static files |
|
64 |
# in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
65 |
# Example: "/home/media/media.lawrence.com/static/" |
|
66 |
STATIC_ROOT = '' |
|
67 |
|
|
68 |
# URL prefix for static files. |
|
69 |
# Example: "http://media.lawrence.com/static/" |
|
70 |
STATIC_URL = '/static/' |
|
71 |
|
|
72 |
# Additional locations of static files |
|
73 |
STATICFILES_DIRS = ( |
|
74 |
# Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
75 |
# Always use forward slashes, even on Windows. |
|
76 |
# Don't forget to use absolute paths, not relative paths. |
|
77 |
) |
|
78 |
|
|
79 |
# List of finder classes that know how to find static files in |
|
80 |
# various locations. |
|
81 |
STATICFILES_FINDERS = ( |
|
82 |
'django.contrib.staticfiles.finders.FileSystemFinder', |
|
83 |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
84 |
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
85 |
) |
|
86 |
|
|
87 |
# Make this unique, and don't share it with anybody. |
|
88 |
SECRET_KEY = 'ct(a@ny^_)8v-^)jkdzbktqg6ajfn6y!zdjum^(f_o!h0jeotq' |
|
89 |
|
|
90 |
# List of callables that know how to import templates from various sources. |
|
91 |
TEMPLATE_LOADERS = ( |
|
92 |
'django.template.loaders.filesystem.Loader', |
|
93 |
'django.template.loaders.app_directories.Loader', |
|
94 |
# 'django.template.loaders.eggs.Loader', |
|
95 |
) |
|
96 |
|
|
97 |
MIDDLEWARE_CLASSES = ( |
|
98 |
'django.middleware.common.CommonMiddleware', |
|
99 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
100 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
101 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
102 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
103 |
# Uncomment the next line for simple clickjacking protection: |
|
104 |
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
105 |
) |
|
106 |
|
|
107 |
ROOT_URLCONF = 'aps42.urls' |
|
108 |
|
|
109 |
# Python dotted path to the WSGI application used by Django's runserver. |
|
110 |
WSGI_APPLICATION = 'aps42.wsgi.application' |
|
111 |
|
|
112 |
TEMPLATE_DIRS = ( |
|
113 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
114 |
# Always use forward slashes, even on Windows. |
|
115 |
# Don't forget to use absolute paths, not relative paths. |
|
116 |
) |
|
117 |
|
|
118 |
INSTALLED_APPS = ( |
|
119 |
'django.contrib.auth', |
|
120 |
'django.contrib.contenttypes', |
|
121 |
'django.contrib.sessions', |
|
122 |
'django.contrib.sites', |
|
123 |
'django.contrib.messages', |
|
124 |
'django.contrib.staticfiles', |
|
125 |
'reversion', |
|
126 |
'south', |
|
127 |
# Uncomment the next line to enable the admin: |
|
128 |
# 'django.contrib.admin', |
|
129 |
# Uncomment the next line to enable admin documentation: |
|
130 |
# 'django.contrib.admindocs', |
|
131 |
'aps42.a42base', |
|
132 |
) |
|
133 |
|
|
134 |
# A sample logging configuration. The only tangible logging |
|
135 |
# performed by this configuration is to send an email to |
|
136 |
# the site admins on every HTTP 500 error when DEBUG=False. |
|
137 |
# See http://docs.djangoproject.com/en/dev/topics/logging for |
|
138 |
# more details on how to customize your logging configuration. |
|
139 |
LOGGING = { |
|
140 |
'version': 1, |
|
141 |
'disable_existing_loggers': False, |
|
142 |
'filters': { |
|
143 |
'require_debug_false': { |
|
144 |
'()': 'django.utils.log.RequireDebugFalse' |
|
145 |
} |
|
146 |
}, |
|
147 |
'handlers': { |
|
148 |
'mail_admins': { |
|
149 |
'level': 'ERROR', |
|
150 |
'filters': ['require_debug_false'], |
|
151 |
'class': 'django.utils.log.AdminEmailHandler' |
|
152 |
} |
|
153 |
}, |
|
154 |
'loggers': { |
|
155 |
'django.request': { |
|
156 |
'handlers': ['mail_admins'], |
|
157 |
'level': 'ERROR', |
|
158 |
'propagate': True, |
|
159 |
}, |
|
160 |
} |
|
161 |
} |
aps42/urls.py | ||
---|---|---|
1 |
from django.conf.urls import patterns, include, url |
|
2 |
|
|
3 |
# Uncomment the next two lines to enable the admin: |
|
4 |
# from django.contrib import admin |
|
5 |
# admin.autodiscover() |
|
6 |
|
|
7 |
urlpatterns = patterns('', |
|
8 |
# Examples: |
|
9 |
# url(r'^$', 'aps42.views.home', name='home'), |
|
10 |
# url(r'^aps42/', include('aps42.foo.urls')), |
|
11 |
|
|
12 |
# Uncomment the admin/doc line below to enable admin documentation: |
|
13 |
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')), |
|
14 |
|
|
15 |
# Uncomment the next line to enable the admin: |
|
16 |
# url(r'^admin/', include(admin.site.urls)), |
|
17 |
) |
aps42/wsgi.py | ||
---|---|---|
1 |
""" |
|
2 |
WSGI config for aps42 project. |
|
3 |
|
|
4 |
This module contains the WSGI application used by Django's development server |
|
5 |
and any production WSGI deployments. It should expose a module-level variable |
|
6 |
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover |
|
7 |
this application via the ``WSGI_APPLICATION`` setting. |
|
8 |
|
|
9 |
Usually you will have the standard Django WSGI application here, but it also |
|
10 |
might make sense to replace the whole Django WSGI application with a custom one |
|
11 |
that later delegates to the Django one. For example, you could introduce WSGI |
|
12 |
middleware here, or combine a Django application with an application of another |
|
13 |
framework. |
|
14 |
|
|
15 |
""" |
|
16 |
import os |
|
17 |
|
|
18 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aps42.settings") |
|
19 |
|
|
20 |
# This application object is used by any WSGI server configured to use this |
|
21 |
# file. This includes Django's development server, if the WSGI_APPLICATION |
|
22 |
# setting points here. |
|
23 |
from django.core.wsgi import get_wsgi_application |
|
24 |
application = get_wsgi_application() |
|
25 |
|
|
26 |
# Apply WSGI middleware here. |
|
27 |
# from helloworld.wsgi import HelloWorldApplication |
|
28 |
# application = HelloWorldApplication(application) |
calebasse/cale_base/models.py | ||
---|---|---|
1 |
from django.db import models |
|
2 |
|
|
3 |
# Create your models here. |
calebasse/cale_base/models/__init__.py | ||
---|---|---|
1 |
from actes import * |
calebasse/cale_base/models/actes.py | ||
---|---|---|
1 |
from django.db import Model |
|
2 |
|
|
3 |
class Exemple(Model): |
|
4 |
|
|
5 |
class Meta: |
|
6 |
app_label = 'a42base' |
calebasse/cale_base/tests.py | ||
---|---|---|
1 |
""" |
|
2 |
This file demonstrates writing tests using the unittest module. These will pass |
|
3 |
when you run "manage.py test". |
|
4 |
|
|
5 |
Replace this with more appropriate tests for your application. |
|
6 |
""" |
|
7 |
|
|
8 |
from django.test import TestCase |
|
9 |
|
|
10 |
|
|
11 |
class SimpleTest(TestCase): |
|
12 |
def test_basic_addition(self): |
|
13 |
""" |
|
14 |
Tests that 1 + 1 always equals 2. |
|
15 |
""" |
|
16 |
self.assertEqual(1 + 1, 2) |
calebasse/cale_base/views.py | ||
---|---|---|
1 |
# Create your views here. |
calebasse/settings/__init__.py | ||
---|---|---|
1 |
import os.path |
|
2 |
|
|
3 |
PROJECT_PATH = os.path.dirname(os.path.dirname(__file__)) |
|
4 |
|
|
5 |
from common import * |
|
6 |
from calebasse import * |
|
7 |
|
|
8 |
######################################################################### |
|
9 |
# Import settings from local_settings.py, if it exists. |
|
10 |
# |
|
11 |
# Put this at the end of settings.py |
|
12 |
|
|
13 |
try: |
|
14 |
import local_settings |
|
15 |
except ImportError: |
|
16 |
print """ |
|
17 |
------------------------------------------------------------------------- |
|
18 |
You need to create a local_settings.py file which needs to contain at least |
|
19 |
database connection information. |
|
20 |
|
|
21 |
Copy local_settings_example.py to local_settings.py and edit it. |
|
22 |
------------------------------------------------------------------------- |
|
23 |
""" |
|
24 |
import sys |
|
25 |
sys.exit(1) |
|
26 |
else: |
|
27 |
# Import any symbols that begin with A-Z. Append to lists any symbols that |
|
28 |
# begin with "EXTRA_". |
|
29 |
import re |
|
30 |
for attr in dir(local_settings): |
|
31 |
match = re.search('^EXTRA_(\w+)', attr) |
|
32 |
if match: |
|
33 |
name = match.group(1) |
|
34 |
value = getattr(local_settings, attr) |
|
35 |
try: |
|
36 |
globals()[name] += value |
|
37 |
except KeyError: |
|
38 |
globals()[name] = value |
|
39 |
elif re.search('^[A-Z]', attr): |
|
40 |
globals()[attr] = getattr(local_settings, attr) |
calebasse/settings/common.py | ||
---|---|---|
1 |
# Django settings for calebasse project. |
|
2 |
|
|
3 |
import os |
|
4 |
from logging.handlers import SysLogHandler |
|
5 |
|
|
6 |
from ..settings import PROJECT_PATH |
|
7 |
|
|
8 |
DEBUG = True |
|
9 |
TEMPLATE_DEBUG = DEBUG |
|
10 |
|
|
11 |
ADMINS = ( |
|
12 |
# ('Your Name', 'your_email@example.com'), |
|
13 |
) |
|
14 |
|
|
15 |
MANAGERS = ADMINS |
|
16 |
|
|
17 |
DATABASES = { |
|
18 |
'default': { |
|
19 |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. |
|
20 |
'NAME': os.path.join(PROJECT_PATH, 'calebasse.sqlite3'), # Or path to database file if using sqlite3. |
|
21 |
'USER': '', # Not used with sqlite3. |
|
22 |
'PASSWORD': '', # Not used with sqlite3. |
|
23 |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. |
|
24 |
'PORT': '', # Set to empty string for default. Not used with sqlite3. |
|
25 |
} |
|
26 |
} |
|
27 |
|
|
28 |
# Local time zone for this installation. Choices can be found here: |
|
29 |
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name |
|
30 |
# although not all choices may be available on all operating systems. |
|
31 |
# On Unix systems, a value of None will cause Django to use the same |
|
32 |
# timezone as the operating system. |
|
33 |
# If running in a Windows environment this must be set to the same as your |
|
34 |
# system time zone. |
|
35 |
TIME_ZONE = 'Europe/Paris' |
|
36 |
|
|
37 |
# Language code for this installation. All choices can be found here: |
|
38 |
# http://www.i18nguy.com/unicode/language-identifiers.html |
|
39 |
LANGUAGE_CODE = 'fr-fr' |
|
40 |
|
|
41 |
SITE_ID = 1 |
|
42 |
|
|
43 |
# If you set this to False, Django will make some optimizations so as not |
|
44 |
# to load the internationalization machinery. |
|
45 |
USE_I18N = True |
|
46 |
|
|
47 |
# If you set this to False, Django will not format dates, numbers and |
|
48 |
# calendars according to the current locale. |
|
49 |
USE_L10N = True |
|
50 |
|
|
51 |
# If you set this to False, Django will not use timezone-aware datetimes. |
|
52 |
USE_TZ = True |
|
53 |
|
|
54 |
# Absolute filesystem path to the directory that will hold user-uploaded files. |
|
55 |
# Example: "/home/media/media.lawrence.com/media/" |
|
56 |
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media') |
|
57 |
|
|
58 |
# URL that handles the media served from MEDIA_ROOT. Make sure to use a |
|
59 |
# trailing slash. |
|
60 |
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" |
|
61 |
MEDIA_URL = '/media/' |
|
62 |
|
|
63 |
# Absolute path to the directory static files should be collected to. |
|
64 |
# Don't put anything in this directory yourself; store your static files |
|
65 |
# in apps' "static/" subdirectories and in STATICFILES_DIRS. |
|
66 |
# Example: "/home/media/media.lawrence.com/static/" |
|
67 |
STATIC_ROOT = '' |
|
68 |
|
|
69 |
# URL prefix for static files. |
|
70 |
# Example: "http://media.lawrence.com/static/" |
|
71 |
STATIC_URL = '/static/' |
|
72 |
|
|
73 |
# Additional locations of static files |
|
74 |
STATICFILES_DIRS = ( |
|
75 |
# Put strings here, like "/home/html/static" or "C:/www/django/static". |
|
76 |
# Always use forward slashes, even on Windows. |
|
77 |
# Don't forget to use absolute paths, not relative paths. |
|
78 |
) |
|
79 |
|
|
80 |
# List of finder classes that know how to find static files in |
|
81 |
# various locations. |
|
82 |
STATICFILES_FINDERS = ( |
|
83 |
'django.contrib.staticfiles.finders.FileSystemFinder', |
|
84 |
'django.contrib.staticfiles.finders.AppDirectoriesFinder', |
|
85 |
# 'django.contrib.staticfiles.finders.DefaultStorageFinder', |
|
86 |
) |
|
87 |
|
|
88 |
# Make this unique, and don't share it with anybody. |
|
89 |
SECRET_KEY = 'ct(a@ny^_)8v-^)jkdzbktqg6ajfn6y!zdjum^(f_o!h0jeotq' |
|
90 |
|
|
91 |
# List of callables that know how to import templates from various sources. |
|
92 |
TEMPLATE_LOADERS = ( |
|
93 |
'django.template.loaders.filesystem.Loader', |
|
94 |
'django.template.loaders.app_directories.Loader', |
|
95 |
# 'django.template.loaders.eggs.Loader', |
|
96 |
) |
|
97 |
|
|
98 |
MIDDLEWARE_CLASSES = ( |
|
99 |
'django.middleware.common.CommonMiddleware', |
|
100 |
'django.contrib.sessions.middleware.SessionMiddleware', |
|
101 |
'django.middleware.csrf.CsrfViewMiddleware', |
|
102 |
'django.contrib.auth.middleware.AuthenticationMiddleware', |
|
103 |
'django.contrib.messages.middleware.MessageMiddleware', |
|
104 |
# Uncomment the next line for simple clickjacking protection: |
|
105 |
# 'django.middleware.clickjacking.XFrameOptionsMiddleware', |
|
106 |
) |
|
107 |
|
|
108 |
ROOT_URLCONF = 'calebasse.urls' |
|
109 |
|
|
110 |
# Python dotted path to the WSGI application used by Django's runserver. |
|
111 |
WSGI_APPLICATION = 'calebasse.wsgi.application' |
|
112 |
|
|
113 |
TEMPLATE_DIRS = ( |
|
114 |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
|
115 |
# Always use forward slashes, even on Windows. |
|
116 |
# Don't forget to use absolute paths, not relative paths. |
|
117 |
) |
|
118 |
|
|
119 |
INSTALLED_APPS = ( |
|
120 |
'django.contrib.auth', |
|
121 |
'django.contrib.contenttypes', |
|
122 |
'django.contrib.sessions', |
|
123 |
'django.contrib.sites', |
|
124 |
'django.contrib.messages', |
|
125 |
'django.contrib.staticfiles', |
|
126 |
'reversion', |
|
127 |
'south', |
|
128 |
# Uncomment the next line to enable the admin: |
|
129 |
# 'django.contrib.admin', |
|
130 |
# Uncomment the next line to enable admin documentation: |
|
131 |
# 'django.contrib.admindocs', |
|
132 |
'calebasse.cale_base', |
|
133 |
) |
|
134 |
|
|
135 |
# A sample logging configuration. The only tangible logging |
|
136 |
# performed by this configuration is to send an email to |
|
137 |
# the site admins on every HTTP 500 error when DEBUG=False. |
|
138 |
# See http://docs.djangoproject.com/en/dev/topics/logging for |
|
139 |
# more details on how to customize your logging configuration. |
|
140 |
LOGGING = { |
|
141 |
'version': 1, |
|
142 |
'disable_existing_loggers': False, |
|
143 |
'filters': { |
|
144 |
'require_debug_false': { |
|
145 |
'()': 'django.utils.log.RequireDebugFalse' |
|
146 |
} |
|
147 |
}, |
|
148 |
'handlers': { |
|
149 |
'mail_admins': { |
|
150 |
'level': 'ERROR', |
|
151 |
'filters': ['require_debug_false'], |
|
152 |
'class': 'django.utils.log.AdminEmailHandler' |
|
153 |
}, |
|
154 |
'syslog':{ |
|
155 |
'level':'INFO', |
|
156 |
'class':'logging.handlers.SysLogHandler', |
|
157 |
'formatter': 'syslog', |
|
158 |
'facility': SysLogHandler.LOG_LOCAL0, |
|
159 |
'address': '/dev/log', |
|
160 |
}, |
|
161 |
}, |
|
162 |
'loggers': { |
|
163 |
'': { |
|
164 |
'handlers': ['mail_admins','syslog'], |
|
165 |
'level': 'INFO', |
|
166 |
}, |
|
167 |
}, |
|
168 |
} |
calebasse/urls.py | ||
---|---|---|
1 |
from django.conf.urls import patterns, include, url |
|
2 |
|
|
3 |
# Uncomment the next two lines to enable the admin: |
|
4 |
# from django.contrib import admin |
|
5 |
# admin.autodiscover() |
|
6 |
|
|
7 |
urlpatterns = patterns('', |
|
8 |
# Examples: |
|
9 |
# url(r'^$', 'calebasse.views.home', name='home'), |
|
10 |
# url(r'^calebasse/', include('aps42.foo.urls')), |
|
11 |
|
|
12 |
# Uncomment the admin/doc line below to enable admin documentation: |
|
13 |
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')), |
|
14 |
|
|
15 |
# Uncomment the next line to enable the admin: |
|
16 |
# url(r'^admin/', include(admin.site.urls)), |
|
17 |
) |
calebasse/wsgi.py | ||
---|---|---|
1 |
""" |
|
2 |
WSGI config for calebasse project. |
|
3 |
|
|
4 |
This module contains the WSGI application used by Django's development server |
|
5 |
and any production WSGI deployments. It should expose a module-level variable |
|
6 |
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover |
|
7 |
this application via the ``WSGI_APPLICATION`` setting. |
|
8 |
|
|
9 |
Usually you will have the standard Django WSGI application here, but it also |
|
10 |
might make sense to replace the whole Django WSGI application with a custom one |
|
11 |
that later delegates to the Django one. For example, you could introduce WSGI |
|
12 |
middleware here, or combine a Django application with an application of another |
|
13 |
framework. |
|
14 |
|
|
15 |
""" |
|
16 |
import os |
|
17 |
|
|
18 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "calebasse.settings") |
|
19 |
|
|
20 |
# This application object is used by any WSGI server configured to use this |
|
21 |
# file. This includes Django's development server, if the WSGI_APPLICATION |
|
22 |
# setting points here. |
|
23 |
from django.core.wsgi import get_wsgi_application |
|
24 |
application = get_wsgi_application() |
|
25 |
|
|
26 |
# Apply WSGI middleware here. |
|
27 |
# from helloworld.wsgi import HelloWorldApplication |
|
28 |
# application = HelloWorldApplication(application) |
manage.py | ||
---|---|---|
3 | 3 |
import sys |
4 | 4 |
|
5 | 5 |
if __name__ == "__main__": |
6 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aps42.settings")
|
|
6 |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "calebasse.settings")
|
|
7 | 7 |
|
8 | 8 |
from django.core.management import execute_from_command_line |
9 | 9 |
|
setup.py | ||
---|---|---|
2 | 2 |
from setuptools import setup, find_packages |
3 | 3 |
import os |
4 | 4 |
|
5 |
setup(name='aps42',
|
|
5 |
setup(name='calebasse',
|
|
6 | 6 |
version='0.1', |
7 | 7 |
license='AGPLv3', |
8 | 8 |
description='', |
9 |
url='http://dev.entrouvert.org/projects/aps42/',
|
|
10 |
download_url='http://repos.entrouvert.org/aps42.git/',
|
|
9 |
url='http://dev.entrouvert.org/projects/calebasse/',
|
|
10 |
download_url='http://repos.entrouvert.org/calebasse.git/',
|
|
11 | 11 |
author="Entr'ouvert", |
12 | 12 |
author_email="info@entrouvert.com", |
13 | 13 |
packages=find_packages(os.path.dirname(__file__) or '.'), |
Formats disponibles : Unified diff
rename project from aps42 to calebasse