Gitlab CSE Unil

Commit d812c263 authored by M. Chardon's avatar M. Chardon
Browse files

Merge branch 'django' into 'javascript'

Django

See merge request !5
parents 83a89651 403384eb
from django.core.management.base import CommandError, NoArgsCommand
from django.core.management.base import CommandError, BaseCommand
from django.conf import settings
from adim.models import AnObj
import os
......@@ -6,19 +6,28 @@ import sys
from optparse import make_option
class Command(NoArgsCommand):
class Command(BaseCommand):
help = 'Remove image files not used by an Annotable Object'
option_list = NoArgsCommand.option_list + (
make_option('--noinput',
action='store_false', dest='interactive', default=True,
help="Do NOT prompt the user for input of any kind."),
make_option('-n', '--dry-run',
action='store_true', dest='dry_run', default=False,
help="Do everything except modify the filesystem."),
)
def add_arguments(self, parser):
parser.add_argument(
'--noinput',
action='store_false',
dest='interactive',
default=True,
help="Do NOT prompt the user for input of any kind."
)
parser.add_argument(
'-n',
'--dry-run',
action='store_true',
dest='dry_run',
default=False,
help="Do everything except modify the filesystem."
)
def __init__(self, *args, **kwargs):
super(NoArgsCommand, self).__init__(*args, **kwargs)
super(Command, self).__init__(*args, **kwargs)
self.dry_run = False
self.interactive = True
self.verbosity = 1
......@@ -31,7 +40,7 @@ class Command(NoArgsCommand):
self.dry_run = options['dry_run']
self.verbosity = int(options['verbosity']) if self.interactive else 0
def handle_noargs(self, **options):
def handle(self, *args, **options):
self.set_options(**options)
anobj_uuid_list = AnObj.objects.all().values_list('uuid', flat=True)
......
......@@ -3568,6 +3568,11 @@ canvas.cursor-tool-arrowgeo {
padding: 0 3px 0 0;
border-right: solid 1px #c9c9c9;
width: 30px;
text-align: center;
}
#annotation-markers-panel .card-body .list-group-item-heading h4 {
min-width: 27px;
text-align: center;
}
.adim-env-geomo .adim-view-review #side-col.col-sm-1 {
width: 250px;
......
......@@ -327,12 +327,14 @@ AAI = {
#
# CAUTION: when adding a ttp service, update the template (templates/adim/aom-modal.inc.html) with MODE_ID where needed
#
MOODLE_HREF="http://moodle2.unil.ch/mod/adim/checkAccess.php?uuid={uuid}"
ATTP = {
'OPTIONS': {
'CACHE_TIMEOUT': 20, # 30,
},
'moodle': {
'CHECK_URL': "http://moodle2.unil.ch/mod/adim/checkAccess.php?uuid={uuid}",
'CHECK_URL': MOODLE_HREF,
'MODE_ID': 16
},
'toto': {
......
......@@ -18,12 +18,14 @@ DATABASES = {
'NAME': 'adim_dev2',
'USER': 'adim',
'PASSWORD': 'ioue634jrs8asdfd0hewq876iujkh9877iuzhiuhg9875kb',
'HOST': 'localhost',
'HOST': 'leia.unil.ch',
},
}
MOODLE_HREF = "https://tstmoodle.unil.ch/33/mod/adim/checkAccess.php?uuid={uuid}"
ADIM_PROD = False
ADIM_DEBUG_JS = False
# Only the ip listed here can access the admin interface
INTERNAL_IPS = ('130.223.159.72', )
INTERNAL_IPS = ('130.223.159.72', )
\ No newline at end of file
......@@ -196,11 +196,11 @@
<script type="text/template" id="adim-tool-marker-label">
<li class="adim-tool-marker-label-item list-group-item list-group-item-secondary"
data-label="<%= label %>" data-annot-id="<%= id %>">
<div class="list-group-item-heading text-center" style="float:left;width:12%">
<h4><%= label %></h4>
</div>
<div class="list-group-item-text" style="width:88%;margin-left:12%">
<textarea class="form-control" style="resize: vertical" <%= ro ? 'readonly' : '' %>><%= labelComment %></textarea>
<div class="d-inline-flex justify-content-start">
<div class="p-1 list-group-item-heading"><h4><%= label %></h4></div>
<div class="ml-auto p-1 list-group-item-text">
<textarea class="form-control" style="resize: vertical" <%= ro ? 'readonly' : '' %>><%= labelComment %></textarea>
</div>
</div>
</li>
</script>
......@@ -319,10 +319,10 @@
<script type="text/template" id="shared-adim-tool-marker-label">
<li class="adim-tool-marker-label-item list-group-item" data-annot-id="<%= id %>">
<div class="list-group-item-heading text-center float-left">
<h5><%= label %></h5>
<div class="d-flex justify-content-start">
<div class="p-1 list-group-item-heading"><h5><%= label %></h5></div>
<div class="p-1 list-group-item-text"><%= labelComment %></div>
</div>
<div class="list-group-item-text clearfix small"><%= labelComment %></div>
</li>
</script>
</div>
......
......@@ -21,6 +21,9 @@
<div class="navbar-header">
{% block navbar_brand %}
<a class="navbar-brand" href="{% url "adim.app:home" %}">ADIM</a>
{% if debug %}
<span style="color:red;font-weight: bold;font-size: large;"><i class="fa fa-exclamation-triangle"></i> ENVIRONNEMENT DE TEST&nbsp;</span>
{% endif %}
{% endblock %}
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
......
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