summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAna <ana.charpentier@free.fr>2016-04-18 15:34:37 +0200
committerAna <ana.charpentier@free.fr>2016-04-18 15:34:37 +0200
commitfe5b2c727c748f3f95010346dbcc7ba68e0cdb56 (patch)
tree4592f45d801b069cfab1c6bb760683483288276d
parentd60eef36a023f45224a9b52d17324ab4c1013c47 (diff)
downloadPapillon-fe5b2c727c748f3f95010346dbcc7ba68e0cdb56.tar.bz2
Papillon-fe5b2c727c748f3f95010346dbcc7ba68e0cdb56.zip
ajout du dossier papillon
-rw-r--r--papillon/papillon/__init__.py0
-rw-r--r--papillon/papillon/settings.py121
-rw-r--r--papillon/papillon/urls.py41
-rw-r--r--papillon/papillon/wsgi.py14
4 files changed, 176 insertions, 0 deletions
diff --git a/papillon/papillon/__init__.py b/papillon/papillon/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/papillon/papillon/__init__.py
diff --git a/papillon/papillon/settings.py b/papillon/papillon/settings.py
new file mode 100644
index 0000000..7a32140
--- /dev/null
+++ b/papillon/papillon/settings.py
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+# Django settings for papillon project.
+# Don't edit this file. Put your changes in local_settings.py
+
+DEBUG = False
+TEMPLATE_DEBUG = DEBUG
+
+import os
+PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
+
+EXTRA_URL = ''
+
+STATIC_URL = '/static/'
+
+TINYMCE_URL = 'http://localhost/tinymce/'
+MAX_COMMENT_NB = 10 # max number of comments by poll - 0 to disable comments
+ALLOW_FRONTPAGE_POLL = False # disabled is recommanded for public instance
+# time to live in days
+DAYS_TO_LIVE = 30
+
+STATICFILES_DIRS = [
+ os.path.join(PROJECT_PATH, "static"),
+]
+
+ADMINS = (
+ # ('Your Name', 'your_email@domain.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': PROJECT_PATH + '/papillon.db',
+ }
+}
+
+# Local time zone for this installation. Choices can be found here:
+# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html
+# #DATETIME-TIMEZONE-SET-TABLE
+# although not all variations may be possible on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Europe/Paris'
+
+# Language code for this installation. All choices can be found here:
+# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
+# http://blogs.law.harvard.edu/tech/stories/storyReader$15
+LANGUAGE_CODE = 'fr-fr'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+MEDIA_ROOT = PROJECT_PATH + '/media/'
+
+# URL that handles the media served from MEDIA_ROOT.
+# Example: "http://media.lawrence.com"
+# if you have set an EXTRA_URL set the full path
+MEDIA_URL = '/static/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+# if you have set an EXTRA_URL set the full path
+ADMIN_MEDIA_PREFIX = '/static/admin/'
+
+SECRET_KEY = ''
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.locale.LocaleMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.middleware.doc.XViewMiddleware',
+)
+
+ROOT_URLCONF = 'papillon.urls'
+
+TEMPLATE_DIRS = (
+ PROJECT_PATH + '/templates',
+)
+
+INSTALLED_APPS = (
+ # contribs
+ 'django.contrib.staticfiles',
+ 'django.contrib.auth',
+ 'django.contrib.admin',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.markup',
+
+ # third parties
+ 'south',
+
+ # app
+ 'papillon.polls',
+)
+
+LANGUAGES = (
+ ('fr', 'Français'),
+ ('en', 'English'),
+)
+
+try:
+ from local_settings import *
+except ImportError, e:
+ print 'Unable to load local_settings.py:', e
diff --git a/papillon/papillon/urls.py b/papillon/papillon/urls.py
new file mode 100644
index 0000000..6a357ad
--- /dev/null
+++ b/papillon/papillon/urls.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2008 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# See the file COPYING for details.
+
+# import settings
+from django.conf import settings
+
+from django.conf.urls import patterns, url, include
+from django.contrib import admin
+from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+
+base = '^' + settings.EXTRA_URL
+if settings.EXTRA_URL and not base.endswith('/'):
+ base += '/'
+
+urlpatterns = patterns(
+ '',
+ (base + r'admin/doc/', include('django.contrib.admindocs.urls')),
+ url(base + r'admin/jsi18n/$', 'django.views.i18n.javascript_catalog',
+ name='admin_i18n'),
+ url(base + r'^i18n/', include('django.conf.urls.i18n'), name = 'i18n'),
+ url(base + r'^admin/', include(admin.site.urls)),
+ url(r'^papillon/', include('polls.urls')),
+)
+
+urlpatterns += staticfiles_urlpatterns()
diff --git a/papillon/papillon/wsgi.py b/papillon/papillon/wsgi.py
new file mode 100644
index 0000000..6a10ed9
--- /dev/null
+++ b/papillon/papillon/wsgi.py
@@ -0,0 +1,14 @@
+"""
+WSGI config for papillon project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "papillon.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()