adds contact email as a setting variable from the app (instead of raw in the template
authorduong tam kien <tk@deveha.com>
Fri, 24 Feb 2017 15:04:22 +0100
changeset 376 3d48f9520c8d
parent 367 e1762995780b
child 377 a0ae89d96c27
adds contact email as a setting variable from the app (instead of raw in the template
src/iconolab/settings/dev.py.tmpl
src/iconolab/templates/iconolab/home.html
src/iconolab/views/objects.py
--- a/src/iconolab/settings/dev.py.tmpl	Thu Feb 23 16:48:58 2017 +0100
+++ b/src/iconolab/settings/dev.py.tmpl	Fri Feb 24 15:04:22 2017 +0100
@@ -14,6 +14,8 @@
 
 from iconolab.settings import *
 
+CONTACT_EMAIL = 'youremail@yourprovider.fr'
+
 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 
--- a/src/iconolab/templates/iconolab/home.html	Thu Feb 23 16:48:58 2017 +0100
+++ b/src/iconolab/templates/iconolab/home.html	Fri Feb 24 15:04:22 2017 +0100
@@ -14,7 +14,7 @@
         <p><strong>Bienvenue sur iconolab. La plateforme
         est actuellement en cours de développement.</strong></p>
 
-        <p>La première phase d'expérimentation démarrera mi-mars 2017. Pour plus d'informations, prière de contacter <a href="mailto:iconolab@gmail.com">iconolab at gmail.com</a>.</p>
+        <p>La première phase d'expérimentation démarrera mi-mars 2017. Pour plus d'informations, prière de contacter <a href="mailto:{{ contact }}">{{ contact }}</a>.</p>
 
       </div>
     </div>
--- a/src/iconolab/views/objects.py	Thu Feb 23 16:48:58 2017 +0100
+++ b/src/iconolab/views/objects.py	Fri Feb 24 15:04:22 2017 +0100
@@ -36,6 +36,7 @@
         context = {}
         context['collections_primary'] = Collection.objects.filter(show_image_on_home=True).all()
         context['collections_secondary'] = Collection.objects.filter(show_image_on_home=False).all()
+        context['contact'] = settings.CONTACT_EMAIL
         context['homepage'] = True
         return render(request, 'iconolab/home.html', context)
 
@@ -801,4 +802,3 @@
         context['current_tags_data'] = annotation.current_revision.get_tags_json()
         context['current_comment'] = annotation.current_revision.creation_comment.first()
         return render(request, 'iconolab/merge_revision.html', context)
-