.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# Generated by Django 3.1.2 on 2021-01-18 14:02
|
||||
|
||||
import django.core.files.storage
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import rapids.models
|
||||
import sortedm2m.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('rapids', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='rapid',
|
||||
name='abnormality',
|
||||
field=models.ManyToManyField(blank=True, help_text='The abnormality (laterality and region independent). Used for categorisation but does not affect the answer', to='rapids.Abnormality'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='rapidimage',
|
||||
name='image',
|
||||
field=models.ImageField(storage=django.core.files.storage.FileSystemStorage(base_url='http://penracourses.org.uk//media/rapids/', location='/home/ross/sites/rad/media//rapids/'), upload_to=rapids.models.image_directory_path),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Exam',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('active', models.BooleanField(default=True, help_text='If an exam should be available')),
|
||||
('publish_results', models.BooleanField(default=True, help_text='If an exams results should be available')),
|
||||
('recreate_json', models.BooleanField(default=False, help_text='If the json cache needs updating')),
|
||||
('time_limit', models.IntegerField(default=5400, help_text='Exam time limit (in seconds)')),
|
||||
('exam_questions', sortedm2m.fields.SortedManyToManyField(blank='true', help_text=None, related_name='exams', to='rapids.Rapid')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CidUserAnswer',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('answer', models.TextField(blank=True, max_length=500)),
|
||||
('answer_compare', models.TextField(blank=True, max_length=500)),
|
||||
('cid', models.BigIntegerField(blank=True, help_text='Candidate ID (limitied by BigIntegerField size)', null=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
('exam', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cid_user_answers', to='rapids.exam')),
|
||||
('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cid_user_answers', to='rapids.rapid')),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>Rapids</title>
|
||||
{% block css %}
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" />
|
||||
@@ -23,8 +23,26 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<title>Rapids</title>
|
||||
<div id=link-block>
|
||||
<div class="page-header">
|
||||
{% if request.user.is_authenticated %}
|
||||
<span id="physics-link">
|
||||
<a href="{% url 'physics:index' %}">Physics</a>
|
||||
</span>
|
||||
<span id="logout-link">
|
||||
<a href="{% url 'logout' %}">Logout</a>
|
||||
</span>
|
||||
<span id="profile-link">
|
||||
<a href="{% url 'profile' %}">Profile</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if request.user.is_staff %}
|
||||
<span id="admin-link">
|
||||
<a href="{% url 'admin:index' %}">Admin</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="content container">
|
||||
{% if request.user.is_staff %}<span id="admin-link"><a
|
||||
href="{% url 'admin:index' %}">Admin</a></span>{% endif %}
|
||||
<span id="view-link"><a href="{% url 'rapids:rapid_view' %}">View questions</a></span>
|
||||
@@ -34,12 +52,6 @@
|
||||
</br>
|
||||
Questions by:
|
||||
<span id="authors-link"><a href="{% url 'rapids:author_list' %}">author</a></span>
|
||||
</div>
|
||||
|
||||
<div class="page-header">
|
||||
<h1>Rapids</h1>
|
||||
</div>
|
||||
<div class="content container">
|
||||
{% block navigation %}
|
||||
{% endblock %}
|
||||
<div class="row">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "rapids/base.html" %}
|
||||
{% load static from staticfiles %}
|
||||
{% load static from static %}
|
||||
|
||||
{% block js %}
|
||||
<!--<script type="text/javascript" src="/admin/jsi18n/"></script>-->
|
||||
|
||||
Reference in New Issue
Block a user