improve json editing
This commit is contained in:
@@ -1,12 +1,36 @@
|
||||
{% extends 'atlas/exams.html' %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h2>{{case_detail.collection.name}} / {{case_detail.case.pk}}</h2>
|
||||
|
||||
<p>See https://django-jsonform.readthedocs.io/en/latest/guide/inputs.html for formatting</p>
|
||||
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
<button type="submit">Submit</button>
|
||||
<button type="submit" value="save" name="submit">Submit</button>
|
||||
</form>
|
||||
|
||||
<h2>Blank form</h2>
|
||||
<form>
|
||||
{{ blank_form}}
|
||||
</form>
|
||||
|
||||
<h2>Correct answers</h2>
|
||||
<form method="POST" class="post-form">
|
||||
{% csrf_token %}
|
||||
{{example_form}}
|
||||
<button type="submit" value="answer" name="submit">Save Correct Answers</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
||||
{% comment %} {{ example_form.media }} {% endcomment %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/@json-editor/json-editor@latest/dist/jsoneditor.min.js"></script>
|
||||
<script src="/static/django_jsonforms/jsoneditor_init.js"></script>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
{% extends 'atlas/base.html' %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Case: {{ case.title }}</h2>
|
||||
{{ case_detail.question_schema }}
|
||||
|
||||
|
||||
{{ case.question_answers }}
|
||||
|
||||
{% endblock %}
|
||||
@@ -3,8 +3,8 @@
|
||||
{% block content %}
|
||||
<h2>Atlas</h2>
|
||||
|
||||
<a href="{% url 'atlas:user_collections' %}">Available collections</a><br/>
|
||||
<a href="{% url 'atlas:user_collections' %}">Colletion to view / take</a><br/>
|
||||
View my <a href='{% url "atlas:case_view" %}?author={{request.user.id}}'>cases</a>.<br/>
|
||||
<a href="{% url 'atlas:user_uploads' %}">My uploads</a>
|
||||
<a href="{% url 'atlas:user_uploads' %}">Uploads awaiting import</a>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user