diff --git a/config/urls.py b/config/urls.py index 06b2236..212ac1d 100644 --- a/config/urls.py +++ b/config/urls.py @@ -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")), ] diff --git a/trials/migrations/0003_test_category.py b/trials/migrations/0003_test_category.py new file mode 100644 index 0000000..b0c89df --- /dev/null +++ b/trials/migrations/0003_test_category.py @@ -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), + ), + ] diff --git a/trials/models.py b/trials/models.py index 014c00c..3292fb6 100644 --- a/trials/models.py +++ b/trials/models.py @@ -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):