Parcourir la source

Remove use of BASE URL from django

Jérôme BUISINE il y a 4 ans
Parent
commit
eb7abde541

+ 1 - 0
expe/templates/base.html

@@ -26,6 +26,7 @@
     <!-- Global scripts used -->
     <script type="text/javascript"> 
 
+        // JS need to know if apache2 server use BASE_URL
         // add by default '/' into BASE
         const BASE     = "{{BASE}}"
         const host     = window.location.host

+ 1 - 5
expe/templates/expe/expe.html

@@ -17,11 +17,7 @@
 
     <!-- TODO : Load    img from bitmap with javascript `loadImg.js` -->
     {% if not request.session.expe_finished %}
-        {% if BASE != '' %}
-            <img id="expeImg" src="/{{BASE}}/{{img_merged_path}}" data-img="{{request.session.img_merged}}"/>
-        {% else %}
-            <img id="expeImg" src="{{img_merged_path}}" data-img="{{request.session.img_merged}}"/>
-        {% endif %}
+        <img id="expeImg" src="{{img_merged_path}}" data-img="{{request.session.img_merged}}"/>
     {% endif %}
 
     {% block javascripts %}

+ 1 - 5
expe/templates/expe/expe_list.html

@@ -12,11 +12,7 @@
     <div class="row">
         <div class="col-md-4 offset-md-4">
 
-            {% if BASE != '' %}
-                <form action="/{{BASE}}/indications" id="expeChoice">
-            {% else %}
-                <form action="/indications" id="expeChoice">
-            {% endif %}
+            <form action="/indications" id="expeChoice">
 
                 <div class="form-group">
                     <label for="scene">Select scene:</label>