feature/tests #18

Merged
s470631 merged 8 commits from feature/tests into master 2021-12-12 23:36:29 +01:00
3 changed files with 23 additions and 4 deletions
Showing only changes of commit 23bd685b12 - Show all commits

View File

@ -23,8 +23,8 @@ urlpatterns = [
path('login', login),
path('logout', logout),
path('register', register),
path('users', include("users.urls")),
path('questions', include("questions.urls")),
path('answers', include("answers.urls")),
path('tests', include("trials.urls")),
path('users/', include("users.urls")),
path('questions/', include("questions.urls")),
path('answers/', include("answers.urls")),
path('tests/', include("trials.urls")),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 3.2.9 on 2021-12-11 22:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('trials', '0002_test_passing_score'),
]
operations = [
migrations.AddField(
model_name='test',
name='category',
field=models.CharField(default='', max_length=100),
),
]

View File

@ -3,6 +3,7 @@ from django.db import models
class Test(models.Model):
name = models.CharField(max_length=100)
category = models.CharField(max_length=100, default="")
passing_score = models.PositiveSmallIntegerField(default=0)
def get_score(self, answers):