mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Make users not active by default, requiring email activation
This commit is contained in:
parent
267e331be7
commit
5840d3f95c
3 changed files with 20 additions and 0 deletions
18
stude/accounts/migrations/0005_alter_customuser_is_active.py
Normal file
18
stude/accounts/migrations/0005_alter_customuser_is_active.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 4.2.2 on 2023-07-04 11:33
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounts', '0004_alter_customuser_course_alter_customuser_semester_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customuser',
|
||||||
|
name='is_active',
|
||||||
|
field=models.BooleanField(default=False),
|
||||||
|
),
|
||||||
|
]
|
|
@ -33,6 +33,7 @@ class CustomUser(AbstractUser):
|
||||||
# Username inherited from base user class
|
# Username inherited from base user class
|
||||||
# Password inherited from base user class
|
# Password inherited from base user class
|
||||||
# is_admin inherited from base user class
|
# is_admin inherited from base user class
|
||||||
|
is_active = models.BooleanField(default=False)
|
||||||
is_student = models.BooleanField(default=True)
|
is_student = models.BooleanField(default=True)
|
||||||
is_studying = models.BooleanField(default=False)
|
is_studying = models.BooleanField(default=False)
|
||||||
is_banned = models.BooleanField(default=False)
|
is_banned = models.BooleanField(default=False)
|
||||||
|
|
|
@ -196,4 +196,5 @@ if (DEBUG):
|
||||||
else:
|
else:
|
||||||
DOMAIN = 'stude'
|
DOMAIN = 'stude'
|
||||||
|
|
||||||
|
|
||||||
SITE_NAME = 'Stud-E'
|
SITE_NAME = 'Stud-E'
|
||||||
|
|
Loading…
Reference in a new issue