feature/post-test-answers #24

Merged
s470631 merged 4 commits from feature/post-test-answers into master 2022-01-22 20:39:48 +01:00
3 changed files with 27 additions and 1 deletions
Showing only changes of commit 3570522946 - Show all commits

View File

@ -4,7 +4,6 @@
{% block content %}
<h1>Check your tests</h1>
{{ tests }}
{% for test in tests %}
<div class="mainTestContainer">
<div class="mainTestName">

View File

@ -0,0 +1,21 @@
# Generated by Django 3.2.9 on 2022-01-22 18:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('trials', '0009_auto_20220122_1942'),
]
operations = [
migrations.AddField(
model_name='test',
name='created_by',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tests', to=settings.AUTH_USER_MODEL),
),
]

View File

@ -12,6 +12,12 @@ class Test(models.Model):
# related_name="tests"
# )
category = models.CharField(max_length=100)
created_by = models.ForeignKey(
"users.User",
null=True,
related_name="tests",
on_delete=models.CASCADE
)
objects = TestManager()