feat: added competition logic

This commit is contained in:
Андрей Сумин
2025-03-01 02:33:06 +03:00
parent 930fb23bbc
commit 999f5b0690
9 changed files with 167 additions and 19 deletions
@@ -0,0 +1,18 @@
# Generated by Django 5.1.6 on 2025-02-28 22:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='status',
field=models.CharField(choices=[('student', 'Student'), ('metodist', 'Metodist')], default='student', max_length=10),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 5.1.6 on 2025-02-28 22:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0002_user_status'),
]
operations = [
migrations.AlterField(
model_name='user',
name='status',
field=models.CharField(choices=[('student', 'Student'), ('metodist', 'Metodist')], default='student', max_length=10),
),
]
+1 -1
View File
@@ -13,7 +13,7 @@ class User(BaseModel):
username = models.SlugField(unique=True, verbose_name="Юзернейм")
password = models.TextField(verbose_name="Пароль")
status = models.CharField(max_length=10, choices=UserRole.choices, default=UserRole.STUDENT)
status = models.CharField(max_length=10, choices=UserRole, default="student")
def __str__(self):
return self.username