Parcourir la source

Merge branch 'release/v0.1.4'

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

+ 4 - 14
ThesisWebExpeDjango/urls.py

@@ -17,17 +17,7 @@ from django.contrib import admin
 from django.urls import include, path
 from django.views.generic import RedirectView
 
-from .settings import WEBEXPE_PREFIX_URL
-
-
-if WEBEXPE_PREFIX_URL == '':
-    urlpatterns = [
-        path('', include('expe.urls', namespace='expe')),
-        path('admin/', admin.site.urls),
-    ]
-else:
-    urlpatterns = [
-        path('', RedirectView.as_view(url=WEBEXPE_PREFIX_URL)),
-        path(WEBEXPE_PREFIX_URL + '/', include('expe.urls', namespace='expe')),
-        path(WEBEXPE_PREFIX_URL + '/admin/', admin.site.urls),
-    ]
+urlpatterns = [
+    path('', include('expe.urls', namespace='expe')),
+    path('admin/', admin.site.urls),
+]

+ 2 - 2
expe/templates/base.html

@@ -26,17 +26,17 @@
     <!-- 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
-        var baseUrl  = location.protocol + '//' + host + '/'
+        var baseUrl    = location.protocol + '//' + host + '/'
 
         if (BASE != ''){
             baseUrl += BASE + '/'
         }
 
         const expeUrl  = baseUrl + 'expe'     
-        console.log(expeUrl)
     </script>
     {% block javascripts %}
     

+ 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>