summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-10-25 16:54:04 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-10-25 16:54:04 +0200
commit0366317a825bfe2f914ad281701cef0874666a7b (patch)
tree138532824717f140f78a8f2cd866dddb97b06cfd
parent6498bac09884fecd53bfe49769d3a4db25a614c0 (diff)
parentaab1bd4a31372455f61a9c951b2316a530590c58 (diff)
downloadChimère - projet Saclay-0366317a825bfe2f914ad281701cef0874666a7b.tar.bz2
Chimère - projet Saclay-0366317a825bfe2f914ad281701cef0874666a7b.zip
Merge branch 'v2.1' into ecopole
-rw-r--r--settings.py30
-rw-r--r--static/saclay/css/mobile.css1
-rw-r--r--static/saclay/js/mobile.chimere.js1
-rw-r--r--templates/chimere/base.html5
4 files changed, 25 insertions, 12 deletions
diff --git a/settings.py b/settings.py
index e9750aa..c65f505 100644
--- a/settings.py
+++ b/settings.py
@@ -4,11 +4,12 @@
# Don't edit this file:
# overload all theses settings in your local_settings.py file
-import os
+import os, sys
_ = lambda s: s
DEBUG = False
TEMPLATE_DEBUG = DEBUG
+MOBILE_TEST = False
# Django settings for chimere project.
PROJECT_NAME = u'Chimère'
@@ -19,6 +20,8 @@ CONTACT_EMAIL = ''
STATIC_URL = '/static/'
STATIC_ROOT = ROOT_PATH + 'static/'
+STATICFILES_DIRS = (ROOT_PATH + 'project_static',)
+
TINYMCE_URL = '/tinymce/'
EXTRA_CSS = []
JQUERY_JS_URLS = ('/javascript/jquery/jquery.js',
@@ -125,6 +128,9 @@ modifier votre recherche.</p>
CHIMERE_CSV_ENCODING = 'ISO-8859-1'
+# generic contact email
+CONTACT_EMAIL = ''
+
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
@@ -142,6 +148,9 @@ DATABASES = {
},
}
+if 'test' in sys.argv:
+ SOUTH_TESTS_MIGRATE = False
+
# 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.
@@ -169,9 +178,6 @@ MEDIA_ROOT = ROOT_PATH + 'media/'
# Example: "http://media.lawrence.com"
MEDIA_URL = '/media/'
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = 'achanger_!ToChange!'
-
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
@@ -187,7 +193,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware'
)
-ROOT_URLCONF = 'example_project.urls'
+ROOT_URLCONF = 'chimere_saclay.urls'
TEMPLATE_DIRS = [
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
@@ -214,10 +220,6 @@ INSTALLED_APPS = [
'django.contrib.sites',
'django.contrib.gis',
'django.contrib.staticfiles',
- 'south',
- 'chimere',
- # activate it if you want to use old migration scripts
- #'chimere.scripts',
]
# celery
@@ -235,10 +237,10 @@ except ImportError:
INSTALLED_APPS += [
'south',
'chimere',
- # activate it if you want to use old migration scripts
- #'chimere.scripts',
]
+MOBILE_DOMAINS = [] # if you have specific domains for mobile access
+
LOGFILENAME = '/var/log/django/chimere.log'
LOGGING = {'version': 1,
@@ -306,4 +308,8 @@ if 'OSM_JS_URLS' not in globals():
OSM_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.js",
STATIC_URL + "openlayers/SimplePanZoom.js",
"http://www.openstreetmap.org/openlayers/OpenStreetMap.js"]
-
+if 'OSM_MOBILE_JS_URLS' not in globals():
+ global OSM_MOBILE_URLS
+ OSM_JS_MOBILE_URLS = [STATIC_URL + "openlayers/OpenLayers.mobile.js",
+ STATIC_URL + "openlayers/SimplePanZoom.js",
+ "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"]
diff --git a/static/saclay/css/mobile.css b/static/saclay/css/mobile.css
new file mode 100644
index 0000000..5f3b3bf
--- /dev/null
+++ b/static/saclay/css/mobile.css
@@ -0,0 +1 @@
+/* sample css file for mobile */
diff --git a/static/saclay/js/mobile.chimere.js b/static/saclay/js/mobile.chimere.js
new file mode 100644
index 0000000..e05cd22
--- /dev/null
+++ b/static/saclay/js/mobile.chimere.js
@@ -0,0 +1 @@
+/* sample js file for mobile */
diff --git a/templates/chimere/base.html b/templates/chimere/base.html
index d37a653..171158f 100644
--- a/templates/chimere/base.html
+++ b/templates/chimere/base.html
@@ -7,6 +7,11 @@
<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/styles.css" />
{% for css in EXTRA_CSS %}<link rel="stylesheet" href="{{ css }}" />{% endfor %}
<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/print.css" media='print'/>
+{% if MOBILE %}
+<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/mobile.css" />
+<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/mobile.css" />
+<script src="{{ STATIC_URL }}chimere/js/mobile.chimere.js" type="text/javascript"></script>{%endif%}
+<script src="{{ STATIC_URL }}saclay/js/mobile.chimere.js" type="text/javascript"></script>{%endif%}
{% if css_area %}
<link rel="stylesheet" href="{{ css_area }}" />{% endif %}
{% endblock %}