This commit is contained in:
Hubert Jankowski 2021-12-11 23:14:24 +01:00
parent ef0122597f
commit 23bd685b12
3 changed files with 23 additions and 4 deletions

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):