7 changed files with 94 additions and 13 deletions
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.1 on 2022-09-05 21:36 |
||||
|
||||
import app.models |
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('app', '0012_zone_description'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.RemoveField( |
||||
model_name='challenge', |
||||
name='code', |
||||
), |
||||
migrations.AddField( |
||||
model_name='zone', |
||||
name='mdp', |
||||
field=models.IntegerField(default=app.models.random_string), |
||||
), |
||||
] |
||||
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.1 on 2022-09-05 21:39 |
||||
|
||||
import app.models |
||||
from django.db import migrations, models |
||||
|
||||
|
||||
class Migration(migrations.Migration): |
||||
|
||||
dependencies = [ |
||||
('app', '0013_remove_challenge_code_zone_mdp'), |
||||
] |
||||
|
||||
operations = [ |
||||
migrations.AlterField( |
||||
model_name='zone', |
||||
name='mdp', |
||||
field=models.IntegerField(default=app.models.random_string, unique=True), |
||||
), |
||||
] |
||||
@ -1,3 +1,33 @@
@@ -1,3 +1,33 @@
|
||||
{% extends 'default_template.html' %}{% block 'contenu' %} |
||||
<main role="main" class="inner cover">{{zone.description |safe}} |
||||
</main>{% endblock %} |
||||
<main role="main" class="inner cover">{{zone.description |safe}} |
||||
</main>{% if zone.description %} |
||||
<div class="inner cover"> |
||||
<form action="{% url 'app:displayZone' zone.code %}" method="POST">{% csrf_token %} |
||||
<div class="btn-group-vertical ml-4 mt-4 " role="group" aria-label="Basic example"> |
||||
<div class="btn-group"> |
||||
<input class="text-center form-control-lg mb-2" name="mdp" id="mdp" min="1000" max="9999" required type="number"> |
||||
</div> |
||||
<div class="btn-group"> |
||||
<button type="button" class="btn btn-outline-light py-3 w-100" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '1';">1</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '2';">2</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '3';">3</button> |
||||
</div> |
||||
<div class="btn-group"> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '4';">4</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '5';">5</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '6';">6</button> |
||||
</div> |
||||
<div class="btn-group"> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '7';">7</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '8';">8</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '9';">9</button> |
||||
</div> |
||||
<div class="btn-group"> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value.slice(0, -1);"><</button> |
||||
<button type="button" class="btn btn-outline-light py-3" onclick="document.getElementById('mdp').value=document.getElementById('mdp').value + '0';">0</button> |
||||
<button type="submit" class="btn btn-primary py-3">Go</button> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
</div>{% endif %} |
||||
{% endblock %} |
||||
|
||||
Loading…
Reference in new issue