-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nishant Nayak <[email protected]>
- Loading branch information
1 parent
d82df72
commit de7779e
Showing
5 changed files
with
198 additions
and
6 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
30 changes: 30 additions & 0 deletions
30
corpus/accounts/migrations/0003_alter_executivemember_date_joined_and_more.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,30 @@ | ||
# Generated by Django 4.2.7 on 2024-01-19 16:59 | ||
import datetime | ||
|
||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("accounts", "0002_alter_user_email_alter_user_phone_no_executivemember"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="executivemember", | ||
name="date_joined", | ||
field=models.DateTimeField( | ||
default=datetime.datetime(2024, 1, 19, 22, 29, 26, 499748), | ||
verbose_name="Date Joined", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="executivemember", | ||
name="github", | ||
field=models.CharField( | ||
blank=True, max_length=39, null=True, verbose_name="GitHub Username" | ||
), | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Generated by Django 4.2.7 on 2024-01-19 16:59 | ||
import django.db.models.deletion | ||
from django.conf import settings | ||
from django.db import migrations | ||
from django.db import models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Achievement", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("title", models.CharField(max_length=128, verbose_name="Title")), | ||
("date", models.DateField(verbose_name="Date of Achievement")), | ||
( | ||
"url", | ||
models.URLField(blank=True, null=True, verbose_name="Related URL"), | ||
), | ||
("description", models.TextField(verbose_name="Description")), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Related User", | ||
), | ||
), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="Tag", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"tag", | ||
models.CharField( | ||
choices=[ | ||
("GSOC", "Google Summer of Code"), | ||
("IAS SRFP", "IAS Summer Research Fellowship Program"), | ||
("SB", "Student Branch Award"), | ||
], | ||
max_length=32, | ||
verbose_name="Tag", | ||
), | ||
), | ||
( | ||
"achievement", | ||
models.ForeignKey( | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="pages.achievement", | ||
verbose_name="Achievement", | ||
), | ||
), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name="Publication", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("title", models.CharField(max_length=256, verbose_name="Title")), | ||
("date", models.DateField(verbose_name="Publish Date")), | ||
("url", models.URLField(verbose_name="URL")), | ||
("authors", models.CharField(max_length=256, verbose_name="Authors")), | ||
( | ||
"user", | ||
models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to=settings.AUTH_USER_MODEL, | ||
verbose_name="Related User", | ||
), | ||
), | ||
], | ||
), | ||
] |
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,50 @@ | ||
from accounts.models import User | ||
from django.db import models | ||
|
||
|
||
class Achievement(models.Model): | ||
title = models.CharField(max_length=128, verbose_name="Title") | ||
date = models.DateField(verbose_name="Date of Achievement") | ||
url = models.URLField(blank=True, null=True, verbose_name="Related URL") | ||
user = models.ForeignKey( | ||
User, | ||
on_delete=models.CASCADE, | ||
verbose_name="Related User", | ||
blank=True, | ||
null=True, | ||
) | ||
description = models.TextField(verbose_name="Description") | ||
|
||
def __str__(self): | ||
return self.title | ||
|
||
|
||
class Tag(models.Model): | ||
TAGS = [ | ||
("GSOC", "Google Summer of Code"), | ||
("IAS SRFP", "IAS Summer Research Fellowship Program"), | ||
("SB", "Student Branch Award"), | ||
# TODO: Add more tags | ||
] | ||
|
||
tag = models.CharField(max_length=32, choices=TAGS, verbose_name="Tag") | ||
achievement = models.ForeignKey( | ||
Achievement, on_delete=models.CASCADE, verbose_name="Achievement" | ||
) | ||
|
||
|
||
class Publication(models.Model): | ||
title = models.CharField(max_length=256, verbose_name="Title") | ||
date = models.DateField(verbose_name="Publish Date") | ||
url = models.URLField(verbose_name="URL") | ||
authors = models.CharField(max_length=256, verbose_name="Authors") | ||
user = models.ForeignKey( | ||
User, | ||
on_delete=models.CASCADE, | ||
verbose_name="Related User", | ||
blank=True, | ||
null=True, | ||
) | ||
|
||
def __str__(self): | ||
return self.title |