diff --git a/FusionIIIT/Fusion/settings.py b/FusionIIIT/Fusion/settings.py index 47ef73d..ef6398c 100644 --- a/FusionIIIT/Fusion/settings.py +++ b/FusionIIIT/Fusion/settings.py @@ -106,6 +106,7 @@ 'applications.scholarships.apps.ScholarshipsConfig', 'applications.visitor_hostel.apps.VisitorHostelConfig', 'applications.eis.apps.EisConfig', + 'applications.gymkhana.apps.GymkhanaConfig', 'allauth.account', 'allauth.socialaccount', 'allauth', diff --git a/FusionIIIT/Fusion/urls.py b/FusionIIIT/Fusion/urls.py index 7ee3799..604c1ce 100644 --- a/FusionIIIT/Fusion/urls.py +++ b/FusionIIIT/Fusion/urls.py @@ -36,9 +36,9 @@ url(r'^ocms/', include('applications.online_cms.urls')), url(r'^login/', auth_views.login, name='login'), url(r'^logout/', auth_views.logout, name='logout'), + url(r'^gymkhana/', include('applications.gymkhana.urls')), url(r'^academic-procedures/', include('applications.academic_procedures.urls', namespace='procedures')), - ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/FusionIIIT/applications/academic_information/models.py b/FusionIIIT/applications/academic_information/models.py index 5fea5cb..09dd858 100644 --- a/FusionIIIT/applications/academic_information/models.py +++ b/FusionIIIT/applications/academic_information/models.py @@ -21,7 +21,6 @@ class Constants: ('M.Des', 'M.Des'), ('PhD', 'PhD') ) - CATEGORY = ( ('GEN', 'General'), ('SC', 'Scheduled Castes'), diff --git a/FusionIIIT/applications/gymkhana/__init__.py b/FusionIIIT/applications/gymkhana/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/FusionIIIT/applications/gymkhana/admin.py b/FusionIIIT/applications/gymkhana/admin.py new file mode 100644 index 0000000..4185d36 --- /dev/null +++ b/FusionIIIT/applications/gymkhana/admin.py @@ -0,0 +1,3 @@ +# from django.contrib import admin + +# Register your models here. diff --git a/FusionIIIT/applications/gymkhana/apps.py b/FusionIIIT/applications/gymkhana/apps.py new file mode 100644 index 0000000..b03d38b --- /dev/null +++ b/FusionIIIT/applications/gymkhana/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class GymkhanaConfig(AppConfig): + name = 'applications.gymkhana' diff --git a/FusionIIIT/applications/gymkhana/models.py b/FusionIIIT/applications/gymkhana/models.py new file mode 100644 index 0000000..3a81c22 --- /dev/null +++ b/FusionIIIT/applications/gymkhana/models.py @@ -0,0 +1,156 @@ +from django.db import models + +# Create your models here. +from applications.academic_information.models import Student +from applications.globals.models import ExtraInfo + +TIME = ( + ('6', '6 a.m.'), + ('7', '7 a.m.'), + ('8', '8 a.m.'), + ('9', '9 a.m.'), + ('10', '10 a.m.'), + ('11', '11 a.m.'), + ('12', '12 p.m.'), + ('13', '1 p.m.'), + ('14', '2 p.m.'), + ('15', '3 p.m.'), + ('16', '4 p.m.'), + ('17', '5 p.m.'), + ('18', '6 p.m.'), + ('19', '7 p.m.'), + ('20', '8 p.m.'), + ('21', '9 p.m.') +) + +FEST_NAME = ( + ('Tarang', 'Tarang'), + ('Gusto', 'Gusto'), + ('Abhikalpan', 'Abhikalpan') +) + +CLUB_CATEGORY = ( + ('Technical', 'Technical'), + ('Cultural', 'Cultural'), + ('Sports', 'Sports') +) + +FEST_DOMAIN = ( + ('Event Management and Infra', 'Event Management and Infra'), + ('Finance and Accounts', 'Finance and Accounts'), + ('Marketing and Sponsorship', 'Marketing and Sponsorship'), + ('Media and Public Relations', 'Media and Public Relations'), + ('Help desk and Security', 'Help desk and Security'), + ('Design and Development', 'Design and Development') +) + +STATUS = ( + ('A', 'Accepted'), + ('D', 'Declined'), + ('N', 'Not Processed Yet'), +) + + +class Club(models.Model): + club_name = models.CharField(max_length=30, unique=True) + club_co = models.ForeignKey(Student, related_name="club_coordinator", on_delete=models.CASCADE) + club_coco = models.ForeignKey(Student, related_name="club_co_coordinator", + on_delete=models.CASCADE) + faculty_co = models.ForeignKey(ExtraInfo, on_delete=models.CASCADE) + club_category = models.CharField(max_length=20, choices=CLUB_CATEGORY, default='Sports') + + def __str__(self): + return str(self.club_name) + + +class Club_session(models.Model): + club_id = models.ForeignKey(Club) + session_date = models.DateField() + session_time = models.CharField(max_length=20, choices=TIME) + session_venue = models.CharField(max_length=20) + session_topic = models.CharField(max_length=200) + description = models.TextField(max_length=1000) + attachment = models.CharField(max_length=50) + + class Meta: + db_table = 'Club_session' + unique_together = ('club_id', 'session_date', 'session_time', 'session_venue') + + def __str__(self): + return str(self.session_date) + + +class Club_member(models.Model): + student_id = models.ForeignKey(Student) + club_id = models.ForeignKey(Club) + achievement = models.TextField(max_length=1000) + + class Meta: + db_table = 'Club_member' + unique_together = ('student_id', 'club_id') + + def __str__(self): + return str(self.Student_id) + + +class Fest(models.Model): + name = models.CharField(max_length=9, choices=FEST_NAME) + convenor_name = models.ForeignKey(Student, max_length=25, related_name="convenor", + on_delete=models.CASCADE) + counsellor_name = models.ForeignKey(Student, max_length=25, related_name="counsellor", + on_delete=models.CASCADE) + + def __str__(self): + return str(self.name) + + +class Budget_Fest(models.Model): + fest_id = models.ForeignKey(Fest) + attachment = models.CharField(max_length=50) + description = models.TextField(max_length=1000) + suggestion = models.TextField(max_length=1000) + approve = models.CharField(max_length=1, choices=STATUS, default='N') + + def __str__(self): + return str(self.attachment) + + +class Club_Budget(models.Model): + club_id = models.ForeignKey(Club) + attachment = models.CharField(max_length=50) + description = models.TextField(max_length=1000) + suggestion = models.TextField(max_length=1000) + approve = models.CharField(max_length=1, choices=STATUS, default='N') + + def __str__(self): + return str(self.attachment) + + +class Core_Team(models.Model): + student_id = models.ForeignKey(Student) + fest_id = models.ForeignKey(Fest) + domain = models.CharField(max_length=40, choices=FEST_DOMAIN) + backlog_details = models.TextField(max_length=1000) + discplinary_actions = models.TextField(max_length=1000) + + class Meta: + db_table = 'Core_Team' + unique_together = ('student_id', 'fest_id') + + def __str__(self): + return str(self.domain) + + +class Trip(models.Model): + club_id = models.ForeignKey(Club) + place = models.CharField(max_length=40) + description = models.CharField(max_length=300) + start_date = models.DateField() + end_date = models.DateField() + approve = models.CharField(max_length=1, choices=STATUS, default='N') + + class Meta: + db_table = 'Trip' + + def __str__(self): + return str(self.description) diff --git a/FusionIIIT/applications/gymkhana/tests.py b/FusionIIIT/applications/gymkhana/tests.py new file mode 100644 index 0000000..a79ca8b --- /dev/null +++ b/FusionIIIT/applications/gymkhana/tests.py @@ -0,0 +1,3 @@ +# from django.test import TestCase + +# Create your tests here. diff --git a/FusionIIIT/applications/gymkhana/urls.py b/FusionIIIT/applications/gymkhana/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/FusionIIIT/applications/gymkhana/views.py b/FusionIIIT/applications/gymkhana/views.py new file mode 100644 index 0000000..e69de29 diff --git a/FusionIIIT/templates/gymkhanaModule/applyform.html b/FusionIIIT/templates/gymkhanaModule/applyform.html new file mode 100644 index 0000000..a624f8d --- /dev/null +++ b/FusionIIIT/templates/gymkhanaModule/applyform.html @@ -0,0 +1,297 @@ +{% block applyform %} + + {% comment %}The tab menu starts here!{% endcomment %} + + +
+
+
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ +
+
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ +
+
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+
+ +
+ +
+ +
+
+ + +
+
+ +
+
+ + +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ {% comment %}The add a new skill Accordian starts here!{% endcomment %} +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+
+
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/FusionIIIT/templates/gymkhanaModule/gymkhana.html b/FusionIIIT/templates/gymkhanaModule/gymkhana.html new file mode 100644 index 0000000..4d54ef4 --- /dev/null +++ b/FusionIIIT/templates/gymkhanaModule/gymkhana.html @@ -0,0 +1,97 @@ +{% extends 'globals/base.html' %} +{% load static %} + + +{% block title %} + Gymkhana Module +{% endblock %} + + +{% block body %} + {% block navBar %} + {% include 'dashboard/navbar.html' %} + {% endblock %} + + {% comment %}The grid starts here!{% endcomment %} +
+ + {% comment %}The left-margin segment!{% endcomment %} +
+ + {% comment %} + The left-rail segment starts here! + {% endcomment %} +
+ + {% comment %}The user image card starts here!{% endcomment %} + {% block usercard %} + {% include 'globals/usercard.html' %} + {% endblock %} + {% comment %}The user image card ends here!{% endcomment %} + +
+ + {% comment %}The Tab-Menu starts here!{% endcomment %} + + {% comment %}The Tab-Menu ends here!{% endcomment %} + +
+ {% comment %} + The left-rail segment ends here! + {% endcomment %} + + + + {% comment %} + The central-rail segment starts here! + {% endcomment %} +
+ {% comment %}The Details start here!{% endcomment %} +
+ {% block applyform %} + {% include 'gymkhanaModule/applyform.html' %} + {% endblock %} +
+ {% comment %}The Personal Details end here!{% endcomment %} + + + {% comment %}The Publications starts here!{% endcomment %} +
+ +
+ {% comment %}The Publications ends here!{% endcomment %} + +
+ {% comment %}The central-rail segment ends here!{% endcomment %} + + {% comment %}The right-rail segment starts here!{% endcomment %} +
+
+ {% comment %} + TODO: the right rail! + {% endcomment %} +
+
+ {% comment %}The right-rail segment ends here!{% endcomment %} + + {% comment %}The right-margin segment!{% endcomment %} +
+ +
+ {% comment %}The grid ends here!{% endcomment %} + + + +{% endblock %} \ No newline at end of file