Gitlab CSE Unil

Commit bc2aced5 authored by Julien Furrer's avatar Julien Furrer
Browse files

Refactor: templates location

TSD ...
parent f60292fd
...@@ -7,19 +7,14 @@ ...@@ -7,19 +7,14 @@
**/*.old.jpg **/*.old.jpg
screen_session_cmd
/media /media
/static /static
adim_project/apache.conf adim_project/apache.conf
adim_project/wsgi.py adim_project/wsgi.py
adim_project/settings/local_settings.py
adim_project/apache.conf.tpl adim_project/apache.conf.tpl
adim_app/playground.py adim_app/playground.py
adim_app/templates/playground /templates/playground
adim_app/static/js/playground.js adim_app/static/js/playground.js
adim_project/settings/shib_settings.py
...@@ -34,7 +34,7 @@ def home(request): ...@@ -34,7 +34,7 @@ def home(request):
context = {} context = {}
if request.user.is_anonymous(): if request.user.is_anonymous():
context['next'] = request.GET.get('next', "") context['next'] = request.GET.get('next', "")
return render(request, "adim_app/home.html", context) return render(request, "adim/home.html", context)
def handle_404(request): def handle_404(request):
...@@ -51,7 +51,7 @@ def essai(request): ...@@ -51,7 +51,7 @@ def essai(request):
:param request: :param request:
:return: :return:
""" """
return render(request, "adim_app/essai.html", {}) return render(request, "adim/essai.html", {})
# return render(request, "adim_app/essai.html", {}) # return render(request, "adim_app/essai.html", {})
...@@ -125,7 +125,7 @@ def send_anobj_thumb(request, anobj_uuid): ...@@ -125,7 +125,7 @@ def send_anobj_thumb(request, anobj_uuid):
@login_required @login_required
def annotate_new(request): def annotate_new(request):
return render(request, "adim_app/annotation_new.html", {}) return render(request, "adim/annotation_new.html", {})
@login_required @login_required
...@@ -212,7 +212,7 @@ def annotate(request, anobj_uuid=None): ...@@ -212,7 +212,7 @@ def annotate(request, anobj_uuid=None):
) )
}) })
return render(request, "adim_app/annotation.html", context) return render(request, "adim/annotation.html", context)
@login_required @login_required
......
...@@ -59,7 +59,7 @@ CACHES = { ...@@ -59,7 +59,7 @@ CACHES = {
# ..... TEMPLATES CONFIG # ..... TEMPLATES CONFIG
TEMPLATES = [{ TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': (normpath(join(SITE_ROOT, 'templates')), ),
'OPTIONS': { 'OPTIONS': {
'debug': False, 'debug': False,
'loaders': ( 'loaders': (
...@@ -75,7 +75,7 @@ TEMPLATES = [{ ...@@ -75,7 +75,7 @@ TEMPLATES = [{
'django.core.context_processors.request', 'django.core.context_processors.request',
'django.core.context_processors.tz', 'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
'adim_project.context_processors.default', 'adim_utils.context_processors.default',
], ],
'string_if_invalid': "", 'string_if_invalid': "",
} }
......
{% extends "adim_app/base_annotation.html" %} {% extends "adim/base_annotation.html" %}
{% load static i18n %} {% load static i18n %}
{% block navbar_content %} {% block navbar_content %}
......
{% extends "adim_app/base_annotation.html" %} {% extends "adim/base_annotation.html" %}
{% load static i18n %} {% load static i18n %}
{% block page_head %}{% endblock %} {% block page_head %}{% endblock %}
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</div> </div>
{# -- AnObj Manager Dlog -- #} {# -- AnObj Manager Dlog -- #}
{% include "adim_app/aom-modal.inc.html" %} {% include "adim/aom-modal.inc.html" %}
{# -- SVG export Info -- #} {# -- SVG export Info -- #}
<div class="modal" id="dlg-export-svg-info" data-backdrop="static" data-keyboard="false"> <div class="modal" id="dlg-export-svg-info" data-backdrop="static" data-keyboard="false">
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="col-sm-3" id="home-action-box"> <div class="col-sm-3" id="home-action-box">
<div class="well well-sm"> <div class="well well-sm">
{% if user.is_anonymous %} {% if user.is_anonymous %}
{% include "adim_app/login.inc.html" %} {% include "adim/login.inc.html" %}
{% else %} {% else %}
<a href="{% url "adim.app:annotate-new" %}" <a href="{% url "adim.app:annotate-new" %}"
class="btn btn-lg btn-success btn-block"> class="btn btn-lg btn-success btn-block">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment