-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from IEEE-NITK/add_exec_member_models
Add ExecutiveMember model
- Loading branch information
Showing
14 changed files
with
459 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 154 additions & 0 deletions
154
corpus/accounts/migrations/0002_alter_user_email_alter_user_phone_no_executivemember.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
# Generated by Django 4.2.7 on 2024-01-08 16:02 | ||
import datetime | ||
|
||
import accounts.validators | ||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("config", "0004_sig_society_sigs"), | ||
("accounts", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="user", | ||
name="email", | ||
field=models.EmailField( | ||
max_length=254, unique=True, verbose_name="Personal Email" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="user", | ||
name="phone_no", | ||
field=models.CharField( | ||
max_length=15, | ||
unique=True, | ||
validators=[accounts.validators.validate_phone_number], | ||
verbose_name="Phone Number", | ||
), | ||
), | ||
migrations.CreateModel( | ||
name="ExecutiveMember", | ||
fields=[ | ||
( | ||
"user", | ||
models.OneToOneField( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
primary_key=True, | ||
serialize=False, | ||
to=settings.AUTH_USER_MODEL, | ||
), | ||
), | ||
( | ||
"edu_email", | ||
models.EmailField( | ||
max_length=254, | ||
unique=True, | ||
validators=[accounts.validators.validate_nitk_email], | ||
verbose_name="NITK EDU Email", | ||
), | ||
), | ||
( | ||
"roll_number", | ||
models.CharField( | ||
max_length=8, | ||
unique=True, | ||
validators=[accounts.validators.validate_roll_number], | ||
verbose_name="NITK Roll Number", | ||
), | ||
), | ||
( | ||
"reg_number", | ||
models.CharField( | ||
max_length=10, | ||
unique=True, | ||
validators=[accounts.validators.validate_reg_number], | ||
verbose_name="NITK Registration Number", | ||
), | ||
), | ||
( | ||
"minor_branch", | ||
models.CharField( | ||
blank=True, | ||
choices=[ | ||
("WO", "Water Resources and Ocean Engineering"), | ||
("CH", "Chemical Engineering"), | ||
("CM", "Chemistry"), | ||
("CV", "Civil Engineering"), | ||
("CS", "Computer Science and Engineering"), | ||
("EE", "Electrical and Electronics Engineering"), | ||
("EC", "Electronics and Communication Engineering"), | ||
("IT", "Information Technology"), | ||
("MA", "Mathematical and Computational Sciences"), | ||
("ME", "Mechanical Engineering"), | ||
("MT", "Metallurgical and Materials Engineering"), | ||
("MN", "Mining Engineering"), | ||
("PS", "Physics"), | ||
( | ||
"SM", | ||
"School of Humanities, Social Sciences and Management", | ||
), | ||
], | ||
max_length=2, | ||
null=True, | ||
verbose_name="Minor Branch", | ||
), | ||
), | ||
( | ||
"ieee_number", | ||
models.CharField( | ||
blank=True, | ||
max_length=10, | ||
null=True, | ||
validators=[accounts.validators.validate_ieee_number], | ||
verbose_name="IEEE Membership Number", | ||
), | ||
), | ||
( | ||
"ieee_email", | ||
models.EmailField( | ||
blank=True, | ||
max_length=254, | ||
null=True, | ||
validators=[accounts.validators.validate_ieee_email], | ||
verbose_name="IEEE Email", | ||
), | ||
), | ||
( | ||
"linkedin", | ||
models.URLField( | ||
blank=True, null=True, verbose_name="Linkedin Profile URL" | ||
), | ||
), | ||
( | ||
"github", | ||
models.CharField( | ||
blank=True, null=True, verbose_name="GitHub Username" | ||
), | ||
), | ||
( | ||
"is_nep", | ||
models.BooleanField(default=False, verbose_name="Is NEP Member?"), | ||
), | ||
( | ||
"date_joined", | ||
models.DateTimeField( | ||
default=datetime.datetime(2024, 1, 8, 21, 32, 24, 610176), | ||
verbose_name="Date Joined", | ||
), | ||
), | ||
( | ||
"sig", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, to="config.sig" | ||
), | ||
), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.