From 75152868752fb479853cf05c3ef3f0505173cc67 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 2 Oct 2016 17:05:41 +0200 Subject: Cleaning in settings --- chimere_example_project/settings.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/chimere_example_project/settings.py b/chimere_example_project/settings.py index 901e3bb..5386185 100644 --- a/chimere_example_project/settings.py +++ b/chimere_example_project/settings.py @@ -57,6 +57,10 @@ CHIMERE_DISPLAY_AREAS = True # don't forget to run the upgrade.py script to create appropriate fields in # the database CHIMERE_DAYS_BEFORE_EVENT = 30 +# Dated events must usualy be checked as 'front page' to be displayed +# on front page - set CHIMERE_ALL_DATED_ARE_FRONT to True if you want to +# display all events on front page +CHIMERE_ALL_DATED_ARE_FRONT = True # allow feeds CHIMERE_FEEDS = True # display a directory of items @@ -71,6 +75,7 @@ CHIMERE_MINIATURE_BY_DEFAULT = False # JS definition of the default map (for admin and when no map are defined in # the application) # cf. OpenLayers documentation for more details + # OSM mapnik map CHIMERE_DEFAULT_MAP_LAYER = """new ol.layer.Tile({ style: 'Road', @@ -149,9 +154,17 @@ HAYSTACK_CONNECTIONS = { HAYSTACK_SEARCH_RESULTS_PER_PAGE = 12 HAYSTACK_AUTOCOMPLETE = False +# length of short description +CHIMERE_SHORT_DESC_LENGTH = 400 + CHIMERE_MODIF_EMAIL = _(u"Hello, I would like to propose you a modification " u"about this item: ") +CHIMERE_ROUTING_WARN_MESSAGE = "

Attention

"\ + "

Cet itineraire comporte des passages dangereux, nous vous conseillons"\ + " de modifier votre recherche, en ajoutant par exemple un ou des points "\ + "d'etape à votre parcours pour eviter les zones de danger.

" + CHIMERE_CSV_ENCODING = 'ISO-8859-1' CHIMERE_DEFAULT_ACTIONS = ['view', 'contribute'] @@ -176,8 +189,6 @@ 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 @@ -190,7 +201,7 @@ 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' +LANGUAGE_CODE = 'fr-FR' SITE_ID = 1 @@ -266,8 +277,6 @@ INSTALLED_APPS += [ LOG_PATH = '/var/log/django/' MOBILE_DOMAINS = [] # if you have specific domains for mobile access -CHIMERE_VIEW_RENDERER = 'openlayers' # 'openlayers' or 'leaflet' -CHIMERE_EDIT_RENDERER = 'openlayers' # 'openlayers' try: from local_settings import * -- cgit v1.2.3 From 6ae005fe6aed73fc2f59de2ec143021fdaa476ea Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 2 Oct 2016 23:49:53 +0200 Subject: Pep8 --- chimere_example_project/urls.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/chimere_example_project/urls.py b/chimere_example_project/urls.py index fff1366..22d9111 100644 --- a/chimere_example_project/urls.py +++ b/chimere_example_project/urls.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012-2013 Etienne Loks +# Copyright (C) 2012-2016 Etienne Loks # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -24,21 +24,22 @@ from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns admin.autodiscover() -urlpatterns = patterns('django.views.static', +urlpatterns = patterns( + 'django.views.static', (r'^%s(?P.*)' % settings.MEDIA_URL[1:], 'serve', {'document_root': settings.MEDIA_ROOT}), ) if "tinymce" in settings.INSTALLED_APPS: - urlpatterns += patterns('django.views.static', + urlpatterns += patterns( + 'django.views.static', (r'^tinymce/', include('tinymce.urls')),) urlpatterns += staticfiles_urlpatterns() -urlpatterns += patterns('', +urlpatterns += patterns( + '', (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/', include(admin.site.urls)), url(r'^', include('chimere.urls', namespace="chimere")), ) - - -- cgit v1.2.3