From ed10b9d9a7962358ad9b022254ad7e256111f5c2 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Mon, 18 Dec 2023 13:05:06 +0530 Subject: [PATCH 01/18] Added model for SIGs --- corpus/config/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/corpus/config/models.py b/corpus/config/models.py index a5eb9722..2fe5602b 100644 --- a/corpus/config/models.py +++ b/corpus/config/models.py @@ -69,7 +69,25 @@ class Meta: verbose_name = "Society" verbose_name_plural = "Societies" +class SIG(models.Model): + IEEE_SIGs=[ + ("CompSoc","CompSoc"), + ("Diode","Diode"), + ("Piston","Piston"), + ("WiE","WiE"), + ("SIGHT","SIGHT"), + ] + name = models.CharField(verbose_name="Name", max_length=10, unique=True, choices=IEEE_SIGs) + aboutus=models.CharField(verbose_name="AboutUs") + whatwedo=models.CharField(verbose_name="WhatWeDo") + def __str__(self): + return self.get_name_display() + + class Meta: + verbose_name = "SIG" + verbose_name_plural = "SIGs" + class ModuleConfiguration(models.Model): module_name = models.CharField(max_length=200, blank=False, null=False) module_enabled = models.BooleanField(default=False) From 0f0ea9dd99a6c25f3e4ce57e217c8751c169f97d Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Tue, 23 Jan 2024 23:09:26 +0530 Subject: [PATCH 02/18] modified seo tags on base.html --- corpus/templates/base.html | 92 +++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/corpus/templates/base.html b/corpus/templates/base.html index b6bede18..b3febba4 100644 --- a/corpus/templates/base.html +++ b/corpus/templates/base.html @@ -4,19 +4,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% block title %} {% endblock %} | Corpus + + + + + - + {% block style %} {% endblock %} {% if USE_TAILWIND_CDN_LINK %} From 09a95b5e542e92f6b825acf79e6280904019eb02 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Wed, 24 Jan 2024 19:15:34 +0530 Subject: [PATCH 03/18] configured robotrix setup --- .../0004_alter_executivemember_date_joined.py | 23 + corpus/corpus/settings.py | 1 + corpus/corpus/urls.py | 1 + corpus/robotrix/__init__.py | 0 corpus/robotrix/admin.py | 12 + corpus/robotrix/apps.py | 6 + corpus/robotrix/forms.py | 68 ++ corpus/robotrix/migrations/0001_initial.py | 154 ++++ corpus/robotrix/migrations/__init__.py | 0 corpus/robotrix/models.py | 67 ++ corpus/robotrix/tests/__init__.py | 0 corpus/robotrix/tests/test_models.py | 0 corpus/robotrix/tests/test_urls.py | 80 ++ corpus/robotrix/tests/test_views.py | 13 + corpus/robotrix/urls.py | 40 + corpus/robotrix/views.py | 538 ++++++++++++++ .../components/general_dropdown.html | 6 + corpus/templates/components/navbar_large.html | 6 + corpus/templates/robotrix/admin/admin.html | 18 + .../robotrix/admin/announcements.html | 162 +++++ .../templates/robotrix/admin/team_page.html | 59 ++ corpus/templates/robotrix/admin/teams.html | 47 ++ corpus/templates/robotrix/admin/users.html | 58 ++ corpus/templates/robotrix/base.html | 8 + corpus/templates/robotrix/home.html | 681 ++++++++++++++++++ corpus/templates/robotrix/index.html | 345 +++++++++ corpus/templates/robotrix/register.html | 127 ++++ 27 files changed, 2520 insertions(+) create mode 100644 corpus/accounts/migrations/0004_alter_executivemember_date_joined.py create mode 100644 corpus/robotrix/__init__.py create mode 100644 corpus/robotrix/admin.py create mode 100644 corpus/robotrix/apps.py create mode 100644 corpus/robotrix/forms.py create mode 100644 corpus/robotrix/migrations/0001_initial.py create mode 100644 corpus/robotrix/migrations/__init__.py create mode 100644 corpus/robotrix/models.py create mode 100644 corpus/robotrix/tests/__init__.py create mode 100644 corpus/robotrix/tests/test_models.py create mode 100644 corpus/robotrix/tests/test_urls.py create mode 100644 corpus/robotrix/tests/test_views.py create mode 100644 corpus/robotrix/urls.py create mode 100644 corpus/robotrix/views.py create mode 100644 corpus/templates/robotrix/admin/admin.html create mode 100644 corpus/templates/robotrix/admin/announcements.html create mode 100644 corpus/templates/robotrix/admin/team_page.html create mode 100644 corpus/templates/robotrix/admin/teams.html create mode 100644 corpus/templates/robotrix/admin/users.html create mode 100644 corpus/templates/robotrix/base.html create mode 100644 corpus/templates/robotrix/home.html create mode 100644 corpus/templates/robotrix/index.html create mode 100644 corpus/templates/robotrix/register.html diff --git a/corpus/accounts/migrations/0004_alter_executivemember_date_joined.py b/corpus/accounts/migrations/0004_alter_executivemember_date_joined.py new file mode 100644 index 00000000..e54cc466 --- /dev/null +++ b/corpus/accounts/migrations/0004_alter_executivemember_date_joined.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.4 on 2024-01-24 13:40 +import datetime + +from django.db import migrations +from django.db import models + + +class Migration(migrations.Migration): + + dependencies = [ + ("accounts", "0003_alter_executivemember_date_joined"), + ] + + operations = [ + migrations.AlterField( + model_name="executivemember", + name="date_joined", + field=models.DateTimeField( + default=datetime.datetime(2024, 1, 24, 19, 10, 0, 912845), + verbose_name="Date Joined", + ), + ), + ] diff --git a/corpus/corpus/settings.py b/corpus/corpus/settings.py index 5781433d..3dd51c01 100644 --- a/corpus/corpus/settings.py +++ b/corpus/corpus/settings.py @@ -58,6 +58,7 @@ "embedathon.apps.EmbedathonConfig", "impulse.apps.ImpulseConfig", "electrika.apps.ElectrikaConfig", + "robotrix.apps.RobotrixConfig", ] MIDDLEWARE = [ diff --git a/corpus/corpus/urls.py b/corpus/corpus/urls.py index 3a79703b..e4012286 100644 --- a/corpus/corpus/urls.py +++ b/corpus/corpus/urls.py @@ -25,4 +25,5 @@ path("embedathon/", include("embedathon.urls")), path("impulse/", include("impulse.urls")), path("electrika/", include("electrika.urls")), + path("robotrix/", include("robotrix.urls")), ] diff --git a/corpus/robotrix/__init__.py b/corpus/robotrix/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/corpus/robotrix/admin.py b/corpus/robotrix/admin.py new file mode 100644 index 00000000..808ba0bb --- /dev/null +++ b/corpus/robotrix/admin.py @@ -0,0 +1,12 @@ +from django.contrib import admin +from robotrix.models import Announcement +from robotrix.models import Invite +from robotrix.models import RobotrixUser +from robotrix.models import Team + +# Register your models here. + +admin.site.register(RobotrixUser) +admin.site.register(Team) +admin.site.register(Announcement) +admin.site.register(Invite) diff --git a/corpus/robotrix/apps.py b/corpus/robotrix/apps.py new file mode 100644 index 00000000..9253938c --- /dev/null +++ b/corpus/robotrix/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class RobotrixConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "robotrix" diff --git a/corpus/robotrix/forms.py b/corpus/robotrix/forms.py new file mode 100644 index 00000000..e62f581a --- /dev/null +++ b/corpus/robotrix/forms.py @@ -0,0 +1,68 @@ +from django import forms +from robotrix.models import Announcement +from robotrix.models import Invite +from robotrix.models import RobotrixUser +from robotrix.models import Team + +from corpus.forms import CorpusModelForm + + +class RobotrixForm(CorpusModelForm): + class Meta: + model = RobotrixUser + fields = [ + "from_nitk", + "college_name", + "roll_no", + "ieee_member", + "ieee_membership_no", + ] + + def clean(self): + data = self.cleaned_data + if data.get("from_nitk", None) and not data.get("roll_no", None): + raise forms.ValidationError( + "Enter your roll number for verification that you are from NITK" + ) + + if data.get("ieee_member", None) and not data.get("ieee_membership_no", None): + raise forms.ValidationError( + "Enter your IEEE Membership Number for verification " + + "that you are an IEEE member" + ) + + return data + + +class TeamCreationForm(CorpusModelForm): + class Meta: + model = Team + fields = ["team_name"] + + +class AnnouncementForm(CorpusModelForm): + ANNOUNCEMENT_OPTIONS = [ + ("1", "No email to be sent."), + ("2", "Send email to all team leaders."), + ("3", "Send email to all members"), + ] + + announcement_mailing = forms.ChoiceField( + widget=forms.Select, choices=ANNOUNCEMENT_OPTIONS + ) + + class Meta: + model = Announcement + fields = [ + "content", + "url_link", + "url_link_text", + "announcement_type", + "announcement_mailing", + ] + + +class InviteForm(CorpusModelForm): + class Meta: + model = Invite + fields = ["invite_email"] diff --git a/corpus/robotrix/migrations/0001_initial.py b/corpus/robotrix/migrations/0001_initial.py new file mode 100644 index 00000000..582650f8 --- /dev/null +++ b/corpus/robotrix/migrations/0001_initial.py @@ -0,0 +1,154 @@ +# Generated by Django 4.2.4 on 2024-01-24 13:40 +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="Announcement", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("content", models.TextField()), + ("url_link", models.URLField(blank=True, null=True)), + ( + "url_link_text", + models.CharField(blank=True, max_length=200, null=True), + ), + ( + "announcement_type", + models.CharField( + choices=[ + ("A", "All Robotrix Users"), + ("P", "Paid Teams"), + ("U", "Unpaid Teams"), + ("N", "Registered for Robotrix but no team"), + ("NI", "Not Registered for Robotrix"), + ], + default="A", + max_length=2, + ), + ), + ("date_created", models.DateTimeField(auto_now_add=True)), + ("date_modified", models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name="RobotrixUser", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("from_nitk", models.BooleanField(default=True)), + ( + "college_name", + models.CharField( + default="National Institute of Technology Karnataka", + max_length=200, + ), + ), + ("roll_no", models.CharField(blank=True, max_length=8, null=True)), + ("ieee_member", models.BooleanField(default=False)), + ("ieee_membership_no", models.BigIntegerField(blank=True, null=True)), + ], + ), + migrations.CreateModel( + name="Team", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("team_name", models.CharField(max_length=200)), + ( + "payment_status", + models.CharField( + choices=[ + ("E", "Exempt"), + ("U", "Fee Not Paid"), + ("P", "Fee Paid"), + ], + default="U", + max_length=1, + ), + ), + ( + "team_leader", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="leader", + to="robotrix.robotrixuser", + ), + ), + ], + ), + migrations.AddField( + model_name="robotrixuser", + name="team", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.CASCADE, + related_name="team", + to="robotrix.team", + ), + ), + migrations.AddField( + model_name="robotrixuser", + name="user", + field=models.OneToOneField( + on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL + ), + ), + migrations.CreateModel( + name="Invite", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("invite_email", models.EmailField(max_length=254)), + ( + "inviting_team", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="invite_to_team", + to="robotrix.team", + ), + ), + ], + ), + ] diff --git a/corpus/robotrix/migrations/__init__.py b/corpus/robotrix/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/corpus/robotrix/models.py b/corpus/robotrix/models.py new file mode 100644 index 00000000..35d9008f --- /dev/null +++ b/corpus/robotrix/models.py @@ -0,0 +1,67 @@ +from accounts.models import User +from django.db import models +from embedathon.models import PAYMENT_STATUS + + +class RobotrixUser(models.Model): + user = models.OneToOneField(User, on_delete=models.CASCADE) + from_nitk = models.BooleanField(default=True) + college_name = models.CharField( + max_length=200, default="National Institute of Technology Karnataka" + ) + roll_no = models.CharField(max_length=8, blank=True, null=True) + ieee_member = models.BooleanField(default=False) + ieee_membership_no = models.BigIntegerField(blank=True, null=True) + team = models.ForeignKey( + "Team", on_delete=models.CASCADE, related_name="team", blank=True, null=True + ) + + def __str__(self): + return self.user.email + + +class Team(models.Model): + team_name = models.CharField(max_length=200, blank=False, null=False) + team_leader = models.ForeignKey( + RobotrixUser, on_delete=models.CASCADE, related_name="leader" + ) + + payment_status = models.CharField( + max_length=1, choices=PAYMENT_STATUS, blank=False, null=False, default="U" + ) + + def __str__(self): + return self.team_name + + +class Announcement(models.Model): + + AnnouncementType = ( + ("A", "All Robotrix Users"), + ("P", "Paid Teams"), + ("U", "Unpaid Teams"), + ("N", "Registered for Robotrix but no team"), + ("NI", "Not Registered for Robotrix"), + ) + + content = models.TextField(blank=False, null=False) + url_link = models.URLField(blank=True, null=True) + url_link_text = models.CharField(max_length=200, blank=True, null=True) + announcement_type = models.CharField( + max_length=2, choices=AnnouncementType, blank=False, null=False, default="A" + ) + date_created = models.DateTimeField(auto_now_add=True) + date_modified = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.content[:20] + "..." + + +class Invite(models.Model): + inviting_team = models.ForeignKey( + Team, on_delete=models.CASCADE, related_name="invite_to_team" + ) + invite_email = models.EmailField(blank=False, null=False) + + def __str__(self): + return self.invite_email diff --git a/corpus/robotrix/tests/__init__.py b/corpus/robotrix/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/corpus/robotrix/tests/test_models.py b/corpus/robotrix/tests/test_models.py new file mode 100644 index 00000000..e69de29b diff --git a/corpus/robotrix/tests/test_urls.py b/corpus/robotrix/tests/test_urls.py new file mode 100644 index 00000000..d34f493e --- /dev/null +++ b/corpus/robotrix/tests/test_urls.py @@ -0,0 +1,80 @@ +from django.test import SimpleTestCase +from django.urls import resolve +from django.urls import reverse +from robotrix.views import add_member +from robotrix.views import admin +from robotrix.views import announcements_management +from robotrix.views import create_team +from robotrix.views import delete_announcement +from robotrix.views import delete_payment_proof +from robotrix.views import home +from robotrix.views import index +from robotrix.views import mark_payment_complete +from robotrix.views import mark_payment_incomplete +from robotrix.views import register +from robotrix.views import team_management +from robotrix.views import team_page +from robotrix.views import upload_payment_proof +from robotrix.views import user_management + + +class UrlsTestCase(SimpleTestCase): + def test_home_url_is_resolved(self): + url = reverse("robotrix_home") + self.assertEquals(resolve(url).func, home) + + def test_index_url_is_resolved(self): + url = reverse("robotrix_index") + self.assertEquals(resolve(url).func, index) + + def test_register_url_is_resolved(self): + url = reverse("robotrix_register") + self.assertEquals(resolve(url).func, register) + + def test_create_team_url_is_resolved(self): + url = reverse("robotrix_create_team") + self.assertEquals(resolve(url).func, create_team) + + def test_add_member_url_is_resolved(self): + url = reverse("robotrix_add_member2") + self.assertEquals(resolve(url).func, add_member) + + def test_upload_payment_proof_url_is_resolved(self): + url = reverse("robotrix_upload_payment_proof") + self.assertEquals(resolve(url).func, upload_payment_proof) + + def test_delete_payment_proof_url_is_resolved(self): + url = reverse("robotrix_delete_payment_proof") + self.assertEquals(resolve(url).func, delete_payment_proof) + + def test_admin_url_is_resolved(self): + url = reverse("robotrix_admin") + self.assertEquals(resolve(url).func, admin) + + def test_team_management_url_is_resolved(self): + url = reverse("robotrix_admin_teams") + self.assertEquals(resolve(url).func, team_management) + + def test_team_page_url_is_resolved(self): + url = reverse("robotrix_admin_team_page", args=[1]) + self.assertEquals(resolve(url).func, team_page) + + def test_user_management_url_is_resolved(self): + url = reverse("robotrix_admin_users") + self.assertEquals(resolve(url).func, user_management) + + def test_announcements_management_url_is_resolved(self): + url = reverse("robotrix_announcements") + self.assertEquals(resolve(url).func, announcements_management) + + def test_delete_announcement_url_is_resolved(self): + url = reverse("robotrix_delete_announcement", args=[1]) + self.assertEquals(resolve(url).func, delete_announcement) + + def test_mark_payment_complete_url_is_resolved(self): + url = reverse("robotrix_admin_mark_payment_complete", args=[1]) + self.assertEquals(resolve(url).func, mark_payment_complete) + + def test_mark_payment_incomplete_url_is_resolved(self): + url = reverse("robotrix_admin_mark_payment_incomplete", args=[1]) + self.assertEquals(resolve(url).func, mark_payment_incomplete) diff --git a/corpus/robotrix/tests/test_views.py b/corpus/robotrix/tests/test_views.py new file mode 100644 index 00000000..460d6492 --- /dev/null +++ b/corpus/robotrix/tests/test_views.py @@ -0,0 +1,13 @@ +from django.test import Client +from django.test import TestCase +from django.urls import reverse + + +class ViewsTestCase(TestCase): + def setUp(self): + self.client = Client() + + def test_home_view_GET(self): + response = self.client.get(reverse("robotrix_home")) + self.assertEqual(response.status_code, 200) + self.assertTemplateUsed(response, "robotrix/home.html") diff --git a/corpus/robotrix/urls.py b/corpus/robotrix/urls.py new file mode 100644 index 00000000..2cbc8699 --- /dev/null +++ b/corpus/robotrix/urls.py @@ -0,0 +1,40 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path("", views.home, name="robotrix_home"), + path("index", views.index, name="robotrix_index"), + path("register", views.register, name="robotrix_register"), + path("create_team", views.create_team, name="robotrix_create_team"), + path("create_invite", views.create_invite, name="robotrix_create_invite"), + path("accept_invite/", views.accept_invite, name="robotrix_accept_invite"), + path("delete_invite/", views.delete_invite, name="robotrix_delete_invite"), + path("admin", views.admin, name="robotrix_admin"), + path("admin/teams", views.team_management, name="robotrix_admin_teams"), + path("admin/team/", views.team_page, name="robotrix_admin_team_page"), + path( + "admin/team//mark_payment_complete", + views.mark_payment_complete, + name="robotrix_admin_mark_payment_complete", + ), + path( + "admin/team//mark_payment_incomplete", + views.mark_payment_incomplete, + name="robotrix_admin_mark_payment_incomplete", + ), + path("admin/users", views.user_management, name="robotrix_admin_users"), + path( + "admins/announcements", + views.announcements_management, + name="robotrix_announcements", + ), + path( + "admin/announcements/delete/", + views.delete_announcement, + name="robotrix_delete_announcement", + ), + path( + "admin/team_download", views.team_download, name="robotrix_admin_team_download" + ), +] diff --git a/corpus/robotrix/views.py b/corpus/robotrix/views.py new file mode 100644 index 00000000..9d4ab15f --- /dev/null +++ b/corpus/robotrix/views.py @@ -0,0 +1,538 @@ +from datetime import datetime + +from accounts.models import User +from config.models import DATETIME_FORMAT +from config.models import ModuleConfiguration +from django.contrib import messages +from django.contrib.auth.decorators import login_required +from django.db.models import Count +from django.shortcuts import redirect +from django.shortcuts import render +from robotrix.forms import AnnouncementForm +from robotrix.forms import InviteForm +from robotrix.forms import RobotrixForm +from robotrix.forms import TeamCreationForm +from robotrix.models import Announcement +from robotrix.models import Invite +from robotrix.models import RobotrixUser +from robotrix.models import Team + +from corpus.decorators import ensure_group_membership +from corpus.decorators import module_enabled +from corpus.utils import send_email + + +@module_enabled(module_name="robotrix") +def home(request): + args = {} + # Checking if user is Robotrix_admin group member + if request.user.groups.filter(name="robotrix_admin").exists(): + args = {"admin": True} + config = ModuleConfiguration.objects.get(module_name="robotrix").module_config + + try: + if request.user.is_authenticated: + args["registered"] = True + except RobotrixUser.DoesNotExist: + args["registered"] = False + + reg_start_datetime, reg_end_datetime = ( + config["reg_start_datetime"], + config["reg_end_datetime"], + ) + + reg_start_datetime, reg_end_datetime = datetime.strptime( + reg_start_datetime, DATETIME_FORMAT + ), datetime.strptime(reg_end_datetime, DATETIME_FORMAT) + + registration_active = (reg_start_datetime <= datetime.now()) and ( + datetime.now() <= reg_end_datetime + ) + + registration_done = reg_end_datetime < datetime.now() + + args["registration_active"] = registration_active + args["registration_done"] = registration_done + + return render( + request, + "robotrix/home.html", + args, + ) + + +@login_required +@module_enabled(module_name="robotrix") +def index(request): + args = {} + try: + robotrix_user = RobotrixUser.objects.get(user=request.user) + args["robotrix_user"] = robotrix_user + except RobotrixUser.DoesNotExist: + messages.error(request, "Please register for Robotrix first!") + return redirect("robotrix_register") + + if robotrix_user.team is not None: + args["in_team"] = True + + args["team_creation_form"] = TeamCreationForm(instance=robotrix_user.team) + + team = robotrix_user.team + members = RobotrixUser.objects.filter(team=team) + team_count = members.count() + + config = ModuleConfiguration.objects.get(module_name="robotrix").module_config + + max_count = int(config["max_team_size"]) + + if team_count >= max_count: + args["team_full"] = True + if team.team_leader == robotrix_user: + args["is_leader"] = True + invites = Invite.objects.filter(inviting_team=team) + args["invites_from_team"] = invites + args["invite_form"] = InviteForm() + else: + args["is_leader"] = False + + args["team_count"] = team_count + + args["team"] = team + args["members"] = members + args["payment_status"] = team.payment_status + + pay_status = "Not Registered" + + if args["payment_status"] == "E" or args["payment_status"] == "P": + pay_status = "Complete" + elif args["payment_status"] == "U": + pay_status = "Incomplete" + + else: + args["in_team"] = False + args["is_leader"] = False + args["team_creation_form"] = TeamCreationForm() + invites = Invite.objects.filter(invite_email=robotrix_user.user.email) + args["invites_for_user"] = invites + + config = ModuleConfiguration.objects.get(module_name="robotrix").module_config + + reg_start_datetime, reg_end_datetime = ( + config["reg_start_datetime"], + config["reg_end_datetime"], + ) + + reg_start_datetime, reg_end_datetime = datetime.strptime( + reg_start_datetime, DATETIME_FORMAT + ), datetime.strptime(reg_end_datetime, DATETIME_FORMAT) + + registration_active = (reg_start_datetime <= datetime.now()) and ( + datetime.now() <= reg_end_datetime + ) + + args["registration_active"] = registration_active + + try: + if pay_status == "Complete": + announcements = Announcement.objects.filter( + announcement_type__in=["A", "P"] + ) + elif pay_status == "Incomplete": + announcements = Announcement.objects.filter( + announcement_type__in=["A", "U"] + ) + else: + announcements = Announcement.objects.filter( + announcement_type__in=["A", "N"] + ) + except Exception: + announcements = Announcement.objects.filter(announcement_type__in=["A", "N"]) + + announcements = announcements.order_by("-date_created") + + args["announcements"] = announcements + + return render(request, "robotrix/index.html", args) + + +@login_required +@module_enabled(module_name="robotrix") +def register(request): + config = ModuleConfiguration.objects.get(module_name="robotrix").module_config + + reg_start_datetime, reg_end_datetime = ( + config["reg_start_datetime"], + config["reg_end_datetime"], + ) + + reg_start_datetime, reg_end_datetime = datetime.strptime( + reg_start_datetime, DATETIME_FORMAT + ), datetime.strptime(reg_end_datetime, DATETIME_FORMAT) + + registration_active = (reg_start_datetime <= datetime.now()) and ( + datetime.now() <= reg_end_datetime + ) + + if not registration_active: + messages.error(request, "Registration for Robotrix is not active yet!") + return redirect("index") + + try: + robotrix_user = RobotrixUser.objects.get(user=request.user) + messages.error(request, "You have already registered for Robotrix!") + return redirect("robotrix_index") + except RobotrixUser.DoesNotExist: + pass + + if request.method == "POST": + form = RobotrixForm(request.POST) + if form.is_valid(): + robotrix_user = form.save(commit=False) + robotrix_user.user = request.user + robotrix_user.save() + messages.success(request, "Successfully registered for Robotrix!") + return redirect("robotrix_index") + else: + messages.error(request, "Please correct the errors before registering!") + + else: + form = RobotrixForm() + + args = {"form": form} + return render(request, "robotrix/register.html", args) + + +@login_required +@module_enabled(module_name="robotrix") +def create_team(request): + if request.method == "POST": + form = TeamCreationForm(request.POST) + robotrix_user = RobotrixUser.objects.get(user=request.user) + if robotrix_user.team is not None: + if form.is_valid(): + team = robotrix_user.team + team.team_name = form.cleaned_data["team_name"] + team.save() + messages.success(request, "Successfully updated team name!") + return redirect("robotrix_index") + else: + if form.is_valid(): + team = form.save(commit=False) + robotrix_user = RobotrixUser.objects.get(user=request.user) + team.team_leader = robotrix_user + + if robotrix_user.from_nitk or robotrix_user.ieee_member: + team.payment_status = "E" + else: + team.payment_status = "U" + + team.save() + robotrix_user.team = team + robotrix_user.save() + messages.success(request, "Successfully created team!") + return redirect("robotrix_index") + else: + messages.error(request, "Please correct the errors before creating team!") + return redirect("robotrix_index") + + +@login_required +@module_enabled(module_name="robotrix") +def create_invite(request): + robotrix_user = RobotrixUser.objects.get(user=request.user) + if request.method == "POST": + form = InviteForm(request.POST) + if form.is_valid(): + if request.user.email == form.cleaned_data["invite_email"]: + messages.error(request, "You cannot invite yourself!") + return redirect("robotrix_index") + + try: + user = User.objects.get(email=form.cleaned_data["invite_email"]) + invited_imp_user = RobotrixUser.objects.get(user=user) + if invited_imp_user.team is not None: + messages.error(request, "User is already in a team!") + return redirect("robotrix_index") + except (User.DoesNotExist, RobotrixUser.DoesNotExist): + pass + + try: + invite = Invite.objects.get( + inviting_team=robotrix_user.team, + invite_email=form.cleaned_data["invite_email"], + ) + messages.error(request, "Invite has already been sent!") + return redirect("robotrix_index") + except Invite.DoesNotExist: + pass + + invite_counts = Invite.objects.filter( + inviting_team=robotrix_user.team + ).count() + + team_members = RobotrixUser.objects.filter(team=robotrix_user.team).count() + + config = ModuleConfiguration.objects.get( + module_name="robotrix" + ).module_config + max_count = int(config["max_team_size"]) + + if invite_counts >= max_count or team_members >= max_count: + messages.error(request, "Maximum team member limit reached!") + return redirect("robotrix_index") + + invite = form.save(commit=False) + inviting_team = robotrix_user.team + invite.inviting_team = inviting_team + invite.save() + + messages.success(request, "Invite sent!") + return redirect("robotrix_index") + messages.error(request, "Illegal Request") + return redirect("robotrix_index") + + +@login_required +@module_enabled(module_name="robotrix") +def accept_invite(request, pk): + invite = Invite.objects.get(pk=pk) + team_members = RobotrixUser.objects.filter(team=invite.inviting_team).count() + config = ModuleConfiguration.objects.get(module_name="robotrix").module_config + max_count = int(config["max_team_size"]) + + if team_members >= max_count: + invite.delete() + messages.error(request, "Maximum team member limit reached!") + return redirect("robotrix_index") + + if request.user.email != invite.invite_email: + messages.error(request, "Illegal request") + return redirect("robotrix_index") + + robotrix_user = RobotrixUser.objects.get(user=request.user) + robotrix_user.team = invite.inviting_team + robotrix_user.save() + + if robotrix_user.from_nitk or robotrix_user.ieee_member: + inviting_team = invite.inviting_team + inviting_team.payment_status = "E" + inviting_team.save() + + Invite.objects.filter(invite_email=request.user.email).delete() + + messages.success(request, "Invite accepted!") + return redirect("robotrix_index") + + +@login_required +@module_enabled(module_name="robotrix") +def delete_invite(request, pk): + invite = Invite.objects.get(pk=pk) + invite.delete() + + messages.success(request, "Invite deleted!") + return redirect("robotrix_index") + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def admin(request): + return render(request, "robotrix/admin/admin.html", {}) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def team_management(request): + args = {} + args["teams"] = Team.objects.all() + return render(request, "robotrix/admin/teams.html", args) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def team_page(request, pk): + args = {} + team = Team.objects.get(pk=pk) + args["team"] = team + args["members"] = RobotrixUser.objects.filter(team=team) + return render(request, "robotrix/admin/team_page.html", args) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def user_management(request): + args = {} + users = RobotrixUser.objects.all() + + nitk_count = users.values("from_nitk").annotate(count=Count("from_nitk")) + ieee_count = users.values("ieee_member").annotate(count=Count("ieee_member")) + + args = { + "users": users, + "nitk_count": nitk_count, + "ieee_count": ieee_count, + } + return render(request, "robotrix/admin/users.html", args) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def announcements_management(request): + if request.method == "POST": + form = AnnouncementForm(request.POST) + if form.is_valid(): + announcement = form.save() + + mail_option = form.cleaned_data.get("announcement_mailing", "1") + email_ids = None + if mail_option == "2": + # just for team leaders + if announcement.announcement_type == "A": + email_ids = list( + Team.objects.values_list("team_leader__user__email", flat=True) + ) + elif announcement.announcement_type == "P": + email_ids = list( + Team.objects.filter(payment_status__in=["P", "E"]).values_list( + "team_leader__user__email", flat=True + ) + ) + elif announcement.announcement_type == "U": + email_ids = list( + Team.objects.filter(payment_status="U").values_list( + "team_leader__user__email", flat=True + ) + ) + elif mail_option == "3": + # for all members + if announcement.announcement_type == "A": + email_ids = list( + RobotrixUser.objects.values_list("user__email", flat=True) + ) + elif announcement.announcement_type == "P": + email_ids = list( + # send to both paid and exempted teams + RobotrixUser.objects.filter( + team__payment_status__in=["P", "E"] + ).values_list("user__email", flat=True) + ) + elif announcement.announcement_type == "U": + email_ids = list( + RobotrixUser.objects.filter( + team__payment_status="U" + ).values_list("user__email", flat=True) + ) + elif announcement.announcement_type == "N": + email_ids = list( + RobotrixUser.objects.filter(team=None).values_list( + "user__email", flat=True + ) + ) + elif announcement.announcement_type == "NI": + # all users who have not registered for robotrix + users = User.objects.exclude( + email__in=RobotrixUser.objects.values_list( + "user__email", flat=True + ) + ) + + users = users.exclude( + email__in=[ + "robotrix_admin", + "embedathon_admin", + ] + ) + users = users.exclude(is_staff=True) + users = users.exclude(is_superuser=True) + + email_ids = list(users.values_list("email", flat=True)) + + if email_ids is not None: + send_email( + "Announcement | Robotrix", + "emails/robotrix/announcement.html", + {"announcement": announcement}, + bcc=email_ids, + ) + + messages.success(request, "Successfully created announcement!") + return redirect("robotrix_announcements") + else: + messages.error( + request, "Please correct the errors before creating announcement!" + ) + return redirect("robotrix_announcements") + else: + form = AnnouncementForm() + announcements = Announcement.objects.all().order_by("-date_created") + + args = {"form": form, "announcements": announcements} + return render(request, "robotrix/admin/announcements.html", args) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def delete_announcement(request, pk): + announcement = Announcement.objects.get(pk=pk) + announcement.delete() + messages.success(request, "Successfully deleted announcement!") + return redirect("robotrix_announcements") + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def mark_payment_complete(request, pk): + team = Team.objects.get(pk=pk) + team.payment_status = "P" + team.save() + for member in RobotrixUser.objects.filter(team=team): + if member.user.email is not None: + send_email( + "Payment Complete | Robotrix", + "emails/robotrix/payment_complete.html", + {"team": team, "user": member.user}, + bcc=[member.user.email], + ) + messages.success( + request, "Successfully marked payment as complete and sent emails!" + ) + return redirect("robotrix_admin_team_page", pk=pk) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def mark_payment_incomplete(request, pk): + team = Team.objects.get(pk=pk) + team.payment_status = "U" + team.save() + for member in RobotrixUser.objects.filter(team=team): + if member.user.email is not None: + send_email( + "Payment Incomplete | Robotrix", + "emails/robotrix/payment_incomplete.html", + {"team": team, "user": member.user}, + bcc=[member.user.email], + ) + messages.success(request, "Successfully marked payment as incomplete!") + return redirect("robotrix_admin_team_page", pk=pk) + + +@login_required +@ensure_group_membership(group_names=["robotrix_admin"]) +def team_download(request): + import csv + from django.http import HttpResponse + + response = HttpResponse(content_type="text/csv") + response["Content-Disposition"] = 'attachment; filename="teams.csv"' + + writer = csv.writer(response) + writer.writerow(["First Name", "Last Name", "Email"]) + + for team in Team.objects.filter(payment_status__in=["P", "E"]): + leader = team.team_leader + writer.writerow( + [leader.user.first_name, leader.user.last_name, leader.user.email] + ) + + return response diff --git a/corpus/templates/components/general_dropdown.html b/corpus/templates/components/general_dropdown.html index 1685ac99..f38d20c9 100644 --- a/corpus/templates/components/general_dropdown.html +++ b/corpus/templates/components/general_dropdown.html @@ -37,3 +37,9 @@
  • Home
  • Dashboard
  • + + diff --git a/corpus/templates/components/navbar_large.html b/corpus/templates/components/navbar_large.html index 415cd9ed..6d27752c 100644 --- a/corpus/templates/components/navbar_large.html +++ b/corpus/templates/components/navbar_large.html @@ -51,6 +51,12 @@
  • Home
  • Dashboard
  • + + diff --git a/corpus/templates/robotrix/admin/admin.html b/corpus/templates/robotrix/admin/admin.html new file mode 100644 index 00000000..5b4d869a --- /dev/null +++ b/corpus/templates/robotrix/admin/admin.html @@ -0,0 +1,18 @@ +{% extends 'robotrix/base.html' %} + +{% block title %} + Admin + {{ block.super }} +{% endblock %} + +{% block content %} + +{% endblock %} diff --git a/corpus/templates/robotrix/admin/announcements.html b/corpus/templates/robotrix/admin/announcements.html new file mode 100644 index 00000000..e879e4e3 --- /dev/null +++ b/corpus/templates/robotrix/admin/announcements.html @@ -0,0 +1,162 @@ +{% extends 'robotrix/base.html' %} + +{% block title %} + Announcements Management + {{ block.super }} +{% endblock %} + +{% block content %} +
    +

    Announcements Management

    + +
    +
    + {% csrf_token %} +
    + + {{ form.content }} + {% if form.content.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.url_link }} + {% if form.url_link.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.url_link_text }} + {% if form.url_link_text.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.announcement_type }} + {% if form.announcement_type.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.announcement_mailing }} + {% if form.announcement_mailing.errors %} +
    + +
    + {% endif %} +
    + + + +
    +
    + +
    +

    Current Announcements

    + + + + + + + + + + + + + + {% if announcements %} + {% for announcement in announcements %} + + + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + +
    ContentURL LinkURL Link ContentAnnouncement TypeCreated AtDELETE
    {{ forloop.counter }}{{ announcement.content }}{{ announcement.url_link }}{{ announcement.url_link_text }}{{ announcement.get_announcement_type_display }}{{ announcement.date_created }} +
    + {% csrf_token %} + +
    +
    No announcements yet.
    +
    + Back +
    +{% endblock %} + +{% block script %} +{{ block.super }} + +{% endblock %} +``` diff --git a/corpus/templates/robotrix/admin/team_page.html b/corpus/templates/robotrix/admin/team_page.html new file mode 100644 index 00000000..36300b55 --- /dev/null +++ b/corpus/templates/robotrix/admin/team_page.html @@ -0,0 +1,59 @@ +{% extends 'robotrix/base.html' %} + +{% load static %} + +{% block title %} + {{ team.team_name }} | Team Management + {{ block.super }} +{% endblock %} + +{% block content %} +
    +

    {{ team.team_name }}

    +
    +

    Members

    +
    + + + + + + + + + + + + + + {% for member in members %} + + + + + + + + + {% comment %} Whether in team {% endcomment %} + + {% endfor %} + +
    NameEmailFrom NITK?College NameIEEE Member?IEEE Membership Number
    {{ forloop.counter }}{{ member.user }}{{ member.user.email }} {{ member.from_nitk|yesno:"Yes,No" }}{{ member.college_name }}{{ member.ieee_member|yesno:"Yes,No" }}{{ member.ieee_membership_no }}
    +
    +
    +

    Payment status: {{ team.get_payment_status_display }}

    + + {% if team.payment_status == "U" %} + Mark Payment as Complete + {% endif %} + {% if team.payment_status == "P" %} + Mark Payment as Incomplete + {% endif %} + + Back +
    +{% endblock %} diff --git a/corpus/templates/robotrix/admin/teams.html b/corpus/templates/robotrix/admin/teams.html new file mode 100644 index 00000000..1074f180 --- /dev/null +++ b/corpus/templates/robotrix/admin/teams.html @@ -0,0 +1,47 @@ +{% extends 'robotrix/base.html' %} + +{% block title %} + Team Management + {{ block.super }} +{% endblock %} + +{% block content %} +
    +

    Team Management

    +

    Number of teams: {{ teams.count }}

    +
    + + + + + + + + + + + + {% for team in teams %} + + + + + + + + {% endfor %} + +
    NameLeaderPayment StatusActions
    {{ forloop.counter }}{{ team.team_name }}{{ team.team_leader.user }}{{ team.payment_status }} + View +
    +
    + + Back + +
    +{% endblock %} diff --git a/corpus/templates/robotrix/admin/users.html b/corpus/templates/robotrix/admin/users.html new file mode 100644 index 00000000..768e0920 --- /dev/null +++ b/corpus/templates/robotrix/admin/users.html @@ -0,0 +1,58 @@ +{% extends 'base.html' %} + +{% block title %} + User Management | Admin + {{ block.super }} +{% endblock %} + +{% block content %} +
    +

    User Management

    +

    Number of Users:{{ users.count }}

    + +
    +

    Stats

    + NITK Students Stats + {% for item in nitk_count %} +

    {{ item.from_nitk | yesno:"From NITK, Not from NITK" }}: {{ item.count }}

    + {% endfor %} + IEEE Members Stats + {% for item in ieee_count %} +

    {{ item.ieee_member | yesno:"IEEE Member, Not IEEE Member" }}: {{ item.count }}

    + {% endfor %} +
    + +
    + + + + + + + + + + + + + + + {% for user in users %} + + + + + + + + + + + {% endfor %} + +
    NameEmailFrom NITK?College NameIEEE Member?IEEE Membership NumberIn a Team?
    {{ forloop.counter }}{{ user.user }}{{ user.user.email }}{{ user.from_nitk|yesno:"Yes,No" }}{{ user.college_name }}{{ user.ieee_member|yesno:"Yes,No" }}{{ user.ieee_membership_no }}{{ user.team|yesno:"Yes,No" }}
    +
    + + Back +
    +{% endblock %} diff --git a/corpus/templates/robotrix/base.html b/corpus/templates/robotrix/base.html new file mode 100644 index 00000000..140458c4 --- /dev/null +++ b/corpus/templates/robotrix/base.html @@ -0,0 +1,8 @@ +{% extends 'base.html' %} + +{% block title %} +| Robotrix +{% endblock %} + +{% block script %} +{% endblock %} diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html new file mode 100644 index 00000000..1ed868e4 --- /dev/null +++ b/corpus/templates/robotrix/home.html @@ -0,0 +1,681 @@ +{% extends "robotrix/base.html" %} + +{% load static %} + +{% block title %} Robotrix {% endblock %} + +{% block style %} + + +{% endblock %} + +{% block content %} + + {% comment %} Hero Section {% endcomment %} +
    +
    + Robotrix Logo +

    Robotrix

    + {% if admin %} + Admin + {% endif %} +

    24-Hour Signal Processing Hackathon

    +

    Theme: Explainable AI

    +

    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    +

    10th - 13th January 2024

    + {% if registration_active and not registration_done and not registered %} + Register Now + {% elif registration_done and not registered %} + Registerations Closed + {% elif registered %} + Go to Dashboard + {% else %} + Registerations Opening Soon + {% endif %} + +
    + +
    +
    + + {% comment %} About Section {% endcomment %} +
    +
    +
    + +
    +

    WHAT IS IMPULSE?

    +

    + Robotrix is a first of its kind, 24-hour signal processing hackathon conducted by IEEE NITK student branch in association with IEEE NITK SPS student chapter. It presents you with interesting problem statements to ensure a fun-filled learning experience. In addition to the hackathon, a workshop will also be conducted prior to the final event to enhance your experience with us!
    +

    Open to 1st and 2nd year B.Tech students from all over India!

    +
    +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    + Speakers

    +
    +
    +
    + Vineeth N Balasubramanian +
    +
    +

    Breaking the Black Box: Explainability of AI/ML Models for Trustworthy Systems

    + By Vineeth N Balasubramanian + Vineeth N Balasubramanian is a Professor in the Department of Computer Science and Engineering at IIT-Hyderabad, India, and a recent Fulbright-Nehru Visiting Faculty Fellow at Carnegie Mellon University until July 2023. He served as the Founding Head of the Department of Artificial Intelligence at IIT-H from 2019-22. His research focuses on deep learning, machine learning, and computer vision, particularly in explainability, continual learning, and limited labeled data scenarios. He has received numerous accolades, including the Research Excellence Award at IIT-H (2022), Google Research Scholar Award (2021), and NASSCOM AI Gamechanger Award (2022). He is listed among the World's Top 2% Scientists and actively contributes to premier conferences such as CVPR, ICCV, AAAI, IJCAI, ECCV in various senior roles. +
    + 11th Jan, 2024 +
    +
    +
    +
    +
    + Pranav Koundinya +
    +
    +

    Workshop on Grad-CAM

    + By Pranav Koundinya + Chairperson of the Signal Processing Society, IEEE-NITK Student Branch + A final year undergrad in the ECE department, he has worked as a research intern under Prof. Chandra Sekhar Seelamantula at the Spectrum Lab, Indian Institute of Science, Bangalore, where he has worked on the analysis and development of visual anomaly detection models for industrial applications. His interests lie in the fields of image signal processing, computer vision and deep learning. +
    + 12th Jan, 2024 +
    +
    +
    +
    +
    +
    +
    +
    + + {% comment %} Prizes Section {% endcomment %} +
    +
    +
    +

    Prizes

    +

    Exciting prizes to be won!

    +
    +
    + +
    + + + + +
    +
    +

    Prizes and goodies worth INR 8K!

    + {% comment %}

    Prizes and goodies to be announced soon !

    {% endcomment %} +
    +
    + +
    +
    + + {% comment %} Schedule Section {% endcomment %} +
    +
    +
    +

    SCHEDULE

    +

    +
    +
      +
    • +
      +
      +
      +
      + +
      Prelims test
      + +
      +
      +
    • +
    • +
      +
      +
      +
      +
      + +
      Expert talk by Prof. Vineeth Balasubramanian, IITH
      + +
      +
      +
    • +
    • +
      +
      +
      +
      +
      + +
      Workshop on GradCAM by Pranav Koundinya, SPS Chairperson
      + +
      +
      +
    • +
    • +
      +
      +
      +
      +
      + +
      24 hour hackathon
      + +
      +
      +
    • +
    +
    + + {% comment %} FAQ Section {% endcomment %} +
    +
    +
    +
    +
    + + FAQ + +

    + Any Questions? Look Here +

    +

    +

    +
    +
    +
    +
    +
    +
    + +
    +

    + 1st and 2nd-year undergraduate students from any college across India are eligible to participate. +

    +
    +
    + +
    + +
    +

    +

      +
    1. No registration fees for NITK students
    2. +
    3. No registration fees for teams with at least one IEEE member
    4. +
    5. A registration fee of Rs.150 for teams with all non-NITK or non-IEEE members
    6. +
    +

    +
    +
    + +
    + +
    +

    + After registering for Robotrix, make sure to create a team name irrespective of you taking part alone or in teams of 2. After creating the team, join the discord link to receive updates and announcements regarding the event. +

    +
    +
    + +
    + +
    +

    + No, it is not compulsory for the candidates to be from EC or EEE background. All enthusiastic students are welcome to apply. +

    +
    +
    + +
    + +
    +

    + Brush up on your knowledge of Linear Algebra, Signals and Systems, Machine Learning, aptitude and the basics of Python. +

    +
    +
    + +
    + +
    +

    + Final hackathon is in hybrid (both offline and online) mode, teams need not come to NITK campus for final hackathon . If you choose to come to campus, travel and accommodation will not be arranged. Students have to make the travel and accommodation arrangements themselves. Lunch will be provided on 14th January. +

    +
    +
    + +
    + +
    +
    + +
    +

    + No. The test will have questions about the basics of Linear Algebra, Signals and Systems, Machine Learning, Aptitude and some Python coding. It will not have any competitive coding style questions. +

    +
    +
    + +
    + +
    +

    + A maximum of two members are allowed per team. +

    +
    +
    + +
    + +
    +

    + No, it's not necessary for a team to have an IEEE member in the team. Refer to eligibility of the event. +

    +
    +
    + +
    + +
    +

    + No, the workshop and talks are open for everyone who registers for the Hackathon. +

    +
    +
    + +
    + +
    +

    + The final hackathon will be held for 24 hours from 13th January afternoon to 14th January afternoon. Only those who clear the preliminary test would be eligible for the same. +

    +
    +
    + +
    +
    +
    + + {% comment %} Organizers Section {% endcomment %} +
    +
    +
    +

    Organized by

    +
    +
    +
    + + IEEE NITK Logo + +
    +
    + + SPS Logo + +
    +
    +
    +
    +
    + +
    + + {% comment %} Contact Section {% endcomment %} +
    +
    +
    +

    Contact Us

    +
    +

    + Pranav M Koundinya : pranavmkoundinya@gmail.com
    + Raghuram Kannan : raghuramkannan400@gmail.com
    + Kaliki Venkata Srinanda : srinandakv2004@gmail.com +

    +
    +
    +
    +
    +
    +{% endblock %} + +{% block script %} +{{ block.super }} + + + +{% endblock %} diff --git a/corpus/templates/robotrix/index.html b/corpus/templates/robotrix/index.html new file mode 100644 index 00000000..d2aab9c3 --- /dev/null +++ b/corpus/templates/robotrix/index.html @@ -0,0 +1,345 @@ +{% extends 'robotrix/base.html' %} + +{% load static %} + +{% block title %} +Robotrix +{% endblock %} + +{% block style %} + +{% endblock %} + +{% block content %} +
    +
    + Robotrix Logo +

    Robotrix

    +

    24-Hour Signal Processing Hackathon

    +

    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    +

    10th - 13th January 2024

    + {% comment %} Registrations Opening soon {% endcomment %} +
    +
    +
    + +
    +
    +
    +
    +
    +
    + {% if in_team %} +
    +
    +

    Team: {{ team.team_name }}

    + {% comment %} edit button {% endcomment %} + + + +
    +
    + Payment Status: {{ team.get_payment_status_display }} +
    +
    + + {% if team.payment_status == "P" or team.payment_status == "E" %} +
    +

    Join the Discord Server

    + + + + + +
    + {% endif %} + + {% if team.payment_status == "U" %} +
    + + + + + Please pay the fee of Rs. 150 here . If you have already paid the fee, it might take some time for it to be updated here. Please only contact us if it has not been updated for more than a week. + +
    + {% endif %} +
    +
    +

    Team Members

    +
    + Team Size: {{ team_count }} / 2 +
    +
    + {% for member in members %} +
    +
    + {{ member.user }} +
    +
    + {% endfor %} +
    + {% if is_leader and registration_active and not team_full %} +
    +
    OR
    +
    +
    +

    Active Invites

    + {% if invites_from_team %} + + + + + + + + + + {% for invite in invites_from_team %} + + + + + + {% endfor %} + +
    Email AddressActions
    {{ forloop.counter }}{{ invite.invite_email }} + Revoke +
    + {% else %} +

    You have no active invites.

    + {% endif %} +

    Send Invite

    +
    + {% csrf_token %} +
    + + {{ invite_form.invite_email }} +

    Please enter the email that your teammate will + be registering with on Corpus.

    + {% if invite_form.invite_email.errors %} +
    + +
    + {% endif %} +
    +
    + +
    +
    +
    + {% endif %} + + {% elif registration_active %} + {% comment %} IMPORTANT DANGER BANNER {% endcomment %} +
    + + + + + YOU ARE NOT IN A TEAM. Please create a team or join an existing team to complete your registration for Robotrix. + +
    +
    +

    Current Invites

    + {% if invites_for_user %} + + + + + + + + + + + {% for invite in invites_for_user %} + + + + + {% endfor %} + +
    Team NameInvited ByActions
    {{ forloop.counter }}{{ invite.inviting_team.team_name }}{{ invite.inviting_team.team_leader }} + Accept + Reject +
    + {% else %} +

    You have no invites.

    + {% endif %} +
    +
    +
    OR
    +
    +
    +

    Create a team

    +
    + {% csrf_token %} + +
    + + {{ team_creation_form.team_name }} + {% if team_creation_form.team_name.errors %} +
    + +
    + {% endif %} +
    + +
    + +
    +
    +
    + If your team has members who are neither from NITK, nor IEEE members, you will have + to pay a registration amount of Rs. 150. This will be prompted + after you create a team. +
    +
    + + {% endif %} +
    +
    +
    +
    +

    Announcements

    +
    + {% if announcements %} +
      + {% for announcement in announcements %} +
    • + {{ announcement.content | linebreaks }} + {% if announcement.url_link %} + {{ announcement.url_link_text }} + {% endif %} +
    • + {% endfor %} +
    + {% else %} +

    You have no announcements as of now.

    + {% endif %} +
    +
    +
    +
    +
    +{% endblock %} + + +{% block script %} + {{ block.super }} + +{% endblock %} diff --git a/corpus/templates/robotrix/register.html b/corpus/templates/robotrix/register.html new file mode 100644 index 00000000..8c843204 --- /dev/null +++ b/corpus/templates/robotrix/register.html @@ -0,0 +1,127 @@ +{% extends 'robotrix/base.html' %} + +{% block title %} + Register + {{ block.title }} +{% endblock %} + +{% block content %} +
    +

    Register for Robotrix

    +
    + {% csrf_token %} + + {% if form.non_field_errors %} + {% for error in form.non_field_errors %} + + {% endfor %} + {% endif %} + +
    + +
    + {{ form.from_nitk }} +
    + {% if form.from_nitk.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.college_name }} + {% if form.college_name.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.roll_no }} + {% if form.roll_no.errors %} +
    + +
    + {% endif %} +
    + +
    + +
    + {{ form.ieee_member }} +
    + {% if form.ieee_member.errors %} +
    + +
    + {% endif %} +
    + +
    + + {{ form.ieee_membership_no }} + {% if form.ieee_membership_no.errors %} +
    + +
    + {% endif %} +
    + +
    + +
    +
    +
    +{% endblock %} + +{% block script %} + {{ block.super }} + +{% endblock %} From 390558869049ef9135ce019cfa0c6e5caf5489aa Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Fri, 26 Jan 2024 16:41:04 +0530 Subject: [PATCH 04/18] home page changes --- corpus/templates/robotrix/home.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index 1ed868e4..0ed3f57f 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -10,7 +10,7 @@ .hero { background-color: rgba(0, 0, 0, 0.5); - background-image: url("{% static 'img/ieee-robotrix.png' %}"); + background-image: url("{% static 'img/ieee-impulse.png' %}"); background-size: cover; background-position: center; background-blend-mode: overlay; @@ -96,9 +96,13 @@

    -

    WHAT IS IMPULSE?

    -

    - Robotrix is a first of its kind, 24-hour signal processing hackathon conducted by IEEE NITK student branch in association with IEEE NITK SPS student chapter. It presents you with interesting problem statements to ensure a fun-filled learning experience. In addition to the hackathon, a workshop will also be conducted prior to the final event to enhance your experience with us!
    +

    WHAT IS ROBOTRIX?

    +

    + Robotics is an emerging field in today's life. To introduce you to the field of robotics, we present Robotrix, a 24-hour + hackathon conducted by the IEEE NITK Student Branch in association with the IEEE NITK RAS Student Chapter. It presents + you with interesting problem statements to ensure a fun-filled learning experience. In addition to the hackathon, a + workshop will also be conducted before the final event to enhance your experience with us! +

    Open to 1st and 2nd year B.Tech students from all over India!


    @@ -115,7 +119,7 @@

    - Vineeth N Balasubramanian
    @@ -129,7 +133,7 @@

    Breaking the Black Box: Explainability of AI/ML Models fo

    - Pranav Koundinya
    @@ -184,7 +188,7 @@

    Prize
    -

    Prizes and goodies worth INR 8K!

    +

    Prizes and goodies worth INR10K!

    {% comment %}

    Prizes and goodies to be announced soon !

    {% endcomment %}
    @@ -312,7 +316,7 @@

    SCHEDULE

    - 1st and 2nd-year undergraduate students from any college across India are eligible to participate. + 1st or 2nd year B.Tech students from any engineering college in India are eligible to participate.

    @@ -432,7 +436,7 @@

    SCHEDULE

    - Brush up on your knowledge of Linear Algebra, Signals and Systems, Machine Learning, aptitude and the basics of Python. + Brushing up on your aptitude skills and Matlab would be helpful.

    @@ -493,7 +497,7 @@

    SCHEDULE

    - No. The test will have questions about the basics of Linear Algebra, Signals and Systems, Machine Learning, Aptitude and some Python coding. It will not have any competitive coding style questions. + No. The questions contain aptitude, linear algebra and some python questions. It will not have any competitive coding style questions.

    @@ -609,7 +613,7 @@

    SCHEDULE

    - The final hackathon will be held for 24 hours from 13th January afternoon to 14th January afternoon. Only those who clear the preliminary test would be eligible for the same. + The final hackathon will be held for TBD hours from TBDth January afternoon to TBDth January afternoon. Only those who clear the preliminary test would be eligible for the same.

    @@ -633,7 +637,7 @@

    Organized by

    From 566bc311041f09e1677c8c139e2780d2b918cda5 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Fri, 26 Jan 2024 18:56:01 +0530 Subject: [PATCH 05/18] improvised content and minor issue fix in footer --- corpus/templates/base.html | 55 ++++++------------- .../templates/components/general_footer.html | 1 - 2 files changed, 17 insertions(+), 39 deletions(-) diff --git a/corpus/templates/base.html b/corpus/templates/base.html index b3febba4..cb2ebfbe 100644 --- a/corpus/templates/base.html +++ b/corpus/templates/base.html @@ -10,11 +10,11 @@ + content="IEEE NITK is a student chapter of the IEEE Organisation belonging in the Bangalore R10 Section. IEEE NITK undertakes a lot of projects by its various SIGs which are formed and projects undertaken by students are futher applied to help solve daily world problems."> - + @@ -22,8 +22,6 @@ - - @@ -37,8 +35,6 @@ - - @@ -49,42 +45,26 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + - + - - + - - - - + + + + - + @@ -101,7 +81,6 @@ - {% endblock %} diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index a8266384..9e7ba3c7 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -2,7 +2,8 @@ {% load static %} -{% block title %} Robotrix {% endblock %} +{% block title %} Home {{ block.super }} +{% endblock %} {% block style %} @@ -15,11 +16,15 @@ background-position: center; background-blend-mode: overlay; } + /* Small screens (default full width) */ @media (min-width: 640px) { #schedule { max-width: 70%; } + .hero { + background-size: cover; + } } /* Medium screens */ @@ -27,6 +32,9 @@ #schedule { max-width: 80%; } + .hero { + background-size: contain; + } } /* Large screens */ @@ -34,6 +42,9 @@ #schedule { max-width: 50%; } + .hero { + background-size: 60%; /* Adjust the size based on your preference */ + } } /* Extra-large screens */ @@ -41,6 +52,9 @@ #schedule { max-width: 50%; } + .hero { + background-size: 70%; /* Adjust the size based on your preference */ + } } .tick { @@ -61,7 +75,7 @@ {% comment %} Hero Section {% endcomment %}
    + class="hero min-h-[50vh]">

    Robotrix 2024


    @@ -77,7 +91,7 @@

    Registerations Closed {% elif registered %} - Go to Dashboard + Go to Dashboard {% else %} Registerations Opening Soon {% endif %} @@ -96,7 +110,7 @@

    -

    WHAT IS ROBOTRIX?

    +

    KNOW ABOUT ROBOTRIX

    Robotics is an emerging field in today's life. To introduce you to the field of robotics, we present Robotrix, a 24-hour hackathon conducted by the IEEE NITK Student Branch in association with the IEEE NITK RAS Student Chapter. It presents @@ -110,14 +124,16 @@

    WHAT IS ROBOTRI

    + +
    -
    +
    -

    + +

    + {% comment %} Prizes Section {% endcomment %}
    Prize --> -
    + + +
    +

    Top 2 Teams receive prizes from a pool of 5000 INR

    +
    + + + + + + + + + + + + + + + +
    +
    +
    +
    + {% comment %} First prize cup icon svg {% endcomment %} + First Prize +
    +
    +
    +
    + First Prize +
    + {% comment %} Desktop Support Technician {% endcomment %} +
    3000 INR
    +
    +
    +
    + {% comment %} Second prize cup icon svg {% endcomment %} + Second Prize +
    +
    +
    +
    + Second Prize +
    +
    2000 INR
    +
    + {% comment %}

    Prizes and goodies to be announced soon !

    {% endcomment %}
    + + + +
    +


    + + {% comment %} Resources Section {% endcomment %} +
    +
    +
    +
    +

    + RESOURCES

    +
    +
    +
    +

    ROBOTRIX 2023 Problem Statement

    + + +
    +
    +
    +
    +
    - {% comment %} Schedule Section {% endcomment %}
    SCHEDULE
    • -
      +
      - -
      Prelims test
      + +
      Preliminary test
      +

    • -
      +
      - -
      Expert talk by Prof. Vineeth Balasubramanian, IITH
      + +
      Expert talk

      @@ -231,27 +325,52 @@

      SCHEDULE


    • -
      +
      - -
      Workshop on GradCAM by Pranav Koundinya, SPS Chairperson
      + +
      Session 1 on Coppeliasim

    • +
    • +
      +
      + +
      +
      + +
      Assignment
      + +
      +
      +
    • +
    • +
    • +
      +
      + +
      +
      + +
      Session 2 on Coppeliasim
      + +
      +
      +

    • -
      +
      - -
      24 hour hackathon
      + +
      24 hour Final hackathon
      -
    • +
    From 03f7c1c41e66e7f8afa43ec3cde819d163a8a525 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Sat, 3 Feb 2024 21:45:54 +0530 Subject: [PATCH 10/18] FAQs styled and finalised --- corpus/templates/robotrix/home.html | 176 +++++++++------------------- 1 file changed, 58 insertions(+), 118 deletions(-) diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index 9e7ba3c7..ce15580e 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -387,8 +387,6 @@

    SCHEDULE

    openFaq7: false, openFaq8: false, openFaq9: false, - openFaq10: false, - openFaq11: false, } " class="bg-base-200 pt-20 pb-12 lg:pt-[120px] lg:pb-[90px]"> @@ -412,7 +410,7 @@

    SCHEDULE

    @@ -435,13 +433,13 @@

    SCHEDULE

    - 1st or 2nd year B.Tech students from any engineering college in India are eligible to participate. + 1st or 2nd year B.Tech students from any engineering college and any branch in India are eligible to participate.

    @@ -497,13 +495,13 @@

    SCHEDULE

    - After registering for Robotrix, make sure to create a team name irrespective of you taking part alone or in teams of 2. After creating the team, join the discord link to receive updates and announcements regarding the event. + A maximum of two members are allowed per team.

    @@ -526,42 +524,44 @@

    SCHEDULE

    - No, it is not compulsory for the candidates to be from EC or EEE background. All enthusiastic students are welcome to apply. + No. The questions contain aptitude, linear algebra and some python questions. It will not have any competitive coding style questions.

    -

    - Brushing up on your aptitude skills and Matlab would be helpful. -

    + No, it's not necessary for a team to have an IEEE member in the team. Refer to eligibility of the event. +

    + +
    @@ -584,158 +584,98 @@

    SCHEDULE

    - Final hackathon is in hybrid (both offline and online) mode, teams need not come to NITK campus for final hackathon . If you choose to come to campus, travel and accommodation will not be arranged. Students have to make the travel and accommodation arrangements themselves. Lunch will be provided on 14th January. + No, the workshop and talks are open for everyone who registers for the Hackathon.

    - - -
    -
    - -
    -

    - No. The questions contain aptitude, linear algebra and some python questions. It will not have any competitive coding style questions. -

    -
    -
    -
    -
    -

    - A maximum of two members are allowed per team. -

    -
    -
    - -
    -
    -
    -

    +

    - No, it's not necessary for a team to have an IEEE member in the team. Refer to eligibility of the event. -

    + Brushing up on your aptitude skills would be helpful. +

    -
    +

    - No, the workshop and talks are open for everyone who registers for the Hackathon. + Only those who clear the preliminary test would be eligible for the same.

    -
    +

    - The final hackathon will be held for TBD hours from TBDth January afternoon to TBDth January afternoon. Only those who clear the preliminary test would be eligible for the same. + The Complete event is in online mode including the hackathon.

    +
    From 3714f18213081f8ed8239ed9f90311f65de20956 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Sun, 18 Feb 2024 21:46:02 +0530 Subject: [PATCH 11/18] added phone number feature and updated latest event data --- corpus/robotrix/forms.py | 1 + corpus/robotrix/migrations/0001_initial.py | 8 +- corpus/robotrix/models.py | 5 + corpus/robotrix/views.py | 11 ++- .../templates/robotrix/admin/team_page.html | 2 + corpus/templates/robotrix/admin/teams.html | 2 +- corpus/templates/robotrix/admin/users.html | 2 + corpus/templates/robotrix/home.html | 92 ++++++------------- corpus/templates/robotrix/index.html | 17 +--- corpus/templates/robotrix/register.html | 14 ++- 10 files changed, 69 insertions(+), 85 deletions(-) diff --git a/corpus/robotrix/forms.py b/corpus/robotrix/forms.py index e62f581a..f241105f 100644 --- a/corpus/robotrix/forms.py +++ b/corpus/robotrix/forms.py @@ -16,6 +16,7 @@ class Meta: "roll_no", "ieee_member", "ieee_membership_no", + "phone_no", ] def clean(self): diff --git a/corpus/robotrix/migrations/0001_initial.py b/corpus/robotrix/migrations/0001_initial.py index 582650f8..08404e2d 100644 --- a/corpus/robotrix/migrations/0001_initial.py +++ b/corpus/robotrix/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.4 on 2024-01-24 13:40 +# Generated by Django 4.2.4 on 2024-02-18 14:33 import django.db.models.deletion from django.conf import settings from django.db import migrations @@ -73,6 +73,12 @@ class Migration(migrations.Migration): ("roll_no", models.CharField(blank=True, max_length=8, null=True)), ("ieee_member", models.BooleanField(default=False)), ("ieee_membership_no", models.BigIntegerField(blank=True, null=True)), + ( + "phone_no", + models.CharField( + max_length=15, unique=True, verbose_name="Phone Number" + ), + ), ], ), migrations.CreateModel( diff --git a/corpus/robotrix/models.py b/corpus/robotrix/models.py index 35d9008f..3c0a2bc9 100644 --- a/corpus/robotrix/models.py +++ b/corpus/robotrix/models.py @@ -12,6 +12,11 @@ class RobotrixUser(models.Model): roll_no = models.CharField(max_length=8, blank=True, null=True) ieee_member = models.BooleanField(default=False) ieee_membership_no = models.BigIntegerField(blank=True, null=True) + phone_no = models.CharField( + max_length=15, + unique=True, + verbose_name="Phone Number", + ) team = models.ForeignKey( "Team", on_delete=models.CASCADE, related_name="team", blank=True, null=True ) diff --git a/corpus/robotrix/views.py b/corpus/robotrix/views.py index 9d4ab15f..2da86bd3 100644 --- a/corpus/robotrix/views.py +++ b/corpus/robotrix/views.py @@ -31,7 +31,7 @@ def home(request): config = ModuleConfiguration.objects.get(module_name="robotrix").module_config try: - if request.user.is_authenticated: + if request.user.is_authenticated and not RobotrixUser.DoesNotExist: args["registered"] = True except RobotrixUser.DoesNotExist: args["registered"] = False @@ -527,12 +527,17 @@ def team_download(request): response["Content-Disposition"] = 'attachment; filename="teams.csv"' writer = csv.writer(response) - writer.writerow(["First Name", "Last Name", "Email"]) + writer.writerow(["First Name", "Last Name", "Email", "Phone Number"]) for team in Team.objects.filter(payment_status__in=["P", "E"]): leader = team.team_leader writer.writerow( - [leader.user.first_name, leader.user.last_name, leader.user.email] + [ + leader.user.first_name, + leader.user.last_name, + leader.user.email, + leader.user.phone_no, + ] ) return response diff --git a/corpus/templates/robotrix/admin/team_page.html b/corpus/templates/robotrix/admin/team_page.html index 36300b55..136248c8 100644 --- a/corpus/templates/robotrix/admin/team_page.html +++ b/corpus/templates/robotrix/admin/team_page.html @@ -19,6 +19,7 @@

    Members

    Name Email + Phone Number From NITK? College Name IEEE Member? @@ -31,6 +32,7 @@

    Members

    {{ forloop.counter }} {{ member.user }} {{ member.user.email }} + {{ member.user.phone_no }} {{ member.from_nitk|yesno:"Yes,No" }} {{ member.college_name }} {{ member.ieee_member|yesno:"Yes,No" }} diff --git a/corpus/templates/robotrix/admin/teams.html b/corpus/templates/robotrix/admin/teams.html index 1074f180..1d19110c 100644 --- a/corpus/templates/robotrix/admin/teams.html +++ b/corpus/templates/robotrix/admin/teams.html @@ -40,7 +40,7 @@

    Team Management

    Back diff --git a/corpus/templates/robotrix/admin/users.html b/corpus/templates/robotrix/admin/users.html index 768e0920..bbc03715 100644 --- a/corpus/templates/robotrix/admin/users.html +++ b/corpus/templates/robotrix/admin/users.html @@ -29,6 +29,7 @@

    Stats

    Name Email + Phone Number From NITK? College Name IEEE Member? @@ -42,6 +43,7 @@

    Stats

    {{ forloop.counter }} {{ user.user }} {{ user.user.email }} + {{ user.phone_no }} {{ user.from_nitk|yesno:"Yes,No" }} {{ user.college_name }} {{ user.ieee_member|yesno:"Yes,No" }} diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index ce15580e..9dd87288 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -75,7 +75,7 @@ {% comment %} Hero Section {% endcomment %}
    + class="hero min-h-[50vh] min-w-screen">

    Robotrix 2024


    @@ -85,7 +85,7 @@

    A 24-Hour Robotics Hackathon



    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    -

    22nd February - 9th March 2024

    +

    24th February - 10th March 2024

    {% if registration_active and not registration_done and not registered %} Register Now {% elif registration_done and not registered %} @@ -117,7 +117,7 @@

    KNOW ABOUT ROBO you with interesting problem statements to ensure a fun-filled learning experience. In addition to the hackathon, a workshop will also be conducted before the final event to enhance your experience with us!
    -

    Open to 1st and 2nd year B.Tech students from all over India!

    +

    Open to 1st, 2nd and 3rd year B.Tech students from all over India!


    @@ -211,50 +211,7 @@

    Prize -->
    -

    Top 2 Teams receive prizes from a pool of 5000 INR

    -
    - - - - - - - - - - - - - - - -
    -
    -
    -
    - {% comment %} First prize cup icon svg {% endcomment %} - First Prize -
    -
    -
    -
    - First Prize -
    - {% comment %} Desktop Support Technician {% endcomment %} -
    3000 INR
    -
    -
    -
    - {% comment %} Second prize cup icon svg {% endcomment %} - Second Prize -
    -
    -
    -
    - Second Prize -
    -
    2000 INR
    -
    +

    Top 2 Teams receive Prizes worth 5000 INR !

    {% comment %}

    Prizes and goodies to be announced soon !

    {% endcomment %}
    @@ -303,12 +260,12 @@

    SCHEDULE

    - -
    Preliminary test
    + +
    Expert talk
    - -
    +
    +

  • @@ -316,11 +273,12 @@

    SCHEDULE

    - -
    Expert talk
    + +
    Qualifying test
    -
    +
    +

  • @@ -330,9 +288,9 @@

    SCHEDULE

    Session 1 on Coppeliasim
    -
    -
    +
    +

  • @@ -344,7 +302,8 @@

    SCHEDULE

    Assignment
    -
    +
    +
  • @@ -357,7 +316,8 @@

    SCHEDULE

    Session 2 on Coppeliasim
    -
    +
    +

  • @@ -433,7 +393,7 @@

    SCHEDULE

    - 1st or 2nd year B.Tech students from any engineering college and any branch in India are eligible to participate. + 1st, 2nd or 3rd year B.Tech students from any engineering college and any branch in India are eligible to participate.

    @@ -481,7 +441,7 @@

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    SCHEDULE

    -
    +

    .hero { - background-color: rgba(0, 0, 0, 0.5); - background-image: url("{% static 'img/ieee-robotrix.png' %}"); + background-color: rgba(0, 0, 0, 0.6); + background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); background-size: cover; background-position: center; background-blend-mode: overlay; @@ -67,7 +67,7 @@
    - Robotrix Logo +

    Robotrix

    24-Hour Signal Processing Hackathon

    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    @@ -120,16 +120,7 @@

    Edit Team

    - {% if team.payment_status == "P" or team.payment_status == "E" %} -
    -

    Join the Discord Server

    - - - - - -
    - {% endif %} + {% if team.payment_status == "U" %}
    diff --git a/corpus/templates/robotrix/register.html b/corpus/templates/robotrix/register.html index 8c843204..d93e07fe 100644 --- a/corpus/templates/robotrix/register.html +++ b/corpus/templates/robotrix/register.html @@ -57,6 +57,18 @@

    Register for Robotrix

    {% endif %}
    +
    + + {{ form.phone_no }} + {% if form.phone_no.errors %} +
    + +
    + {% endif %} +
    +
    @@ -84,7 +96,7 @@

    Register for Robotrix

    - +
    From 8602faccd9127c9bc212f33ab71866a6a7342c2c Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Sun, 18 Feb 2024 23:02:50 +0530 Subject: [PATCH 12/18] fixed registration display issues on home page --- corpus/robotrix/views.py | 4 +++- corpus/templates/robotrix/home.html | 5 +++-- .../templates/static/img/robotrix/robo_small.png | Bin 0 -> 9895 bytes 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 corpus/templates/static/img/robotrix/robo_small.png diff --git a/corpus/robotrix/views.py b/corpus/robotrix/views.py index 2da86bd3..6008ac4f 100644 --- a/corpus/robotrix/views.py +++ b/corpus/robotrix/views.py @@ -31,8 +31,10 @@ def home(request): config = ModuleConfiguration.objects.get(module_name="robotrix").module_config try: - if request.user.is_authenticated and not RobotrixUser.DoesNotExist: + if request.user.is_authenticated: + robotrix_user = RobotrixUser.objects.get(user=request.user) args["registered"] = True + args["robotrix_user"] = robotrix_user except RobotrixUser.DoesNotExist: args["registered"] = False diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index 9dd87288..1799f950 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -24,6 +24,7 @@ } .hero { background-size: cover; + /* background-image: url("{% static 'img/robotrix/robo_small.png' %}"); */ } } @@ -89,11 +90,11 @@

    Register Now {% elif registration_done and not registered %} - Registerations Closed + Registrations Closed {% elif registered %} Go to Dashboard {% else %} - Registerations Opening Soon + Registrations Opening Soon {% endif %}
    diff --git a/corpus/templates/static/img/robotrix/robo_small.png b/corpus/templates/static/img/robotrix/robo_small.png new file mode 100644 index 0000000000000000000000000000000000000000..3040938ebd3206cd1b20380c8917237794107bd1 GIT binary patch literal 9895 zcmeHtUwIcN8rowGAL*F7^=+zYr02_cve005AvsVeDW=Ij4`_;{Ex_TZH? zX2SB+RZ#%ck2CH801$whlDxjJ`C&oaCxiax0fuKn(ej8?1{-pU7(g5sJ{xSZGA^Yw zJS*f`mcPxfGV?6I=Ku{FHadm;Jf6 z%lzel%j>!8xtX8~CMt!`bb)kO>?d_F%fz_*y19lZA#4gPs^w@)9EZ@*ICCJUi4wad z>L*^J90@u9q+>B6!45|g`7@NF5(}HlpCr?XA}KV^g@GSiM6OGzAu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CmrOIlBvBd0`oqJzda@Hmig5H|=BqlS{G&nLnObAdo?fyCOo6uV^cKwI zi4yp-1i3h!kfj|jy!*ROnRMg}Oj`J~)6W#8yZNPpR8a=bG2-DKi$JWXsjg4y*b43+t~AZLrO2u4}vEUB^IcatNW( zyW&)X8#1U?)9lM}*8|ke_HD`y;|HxX#u=#reClWn&myNs%8WfVA~dcrB5#l`tOvuj zAkxdJaK!PzNS-fF>DXV;VfYqSgr~?PIZ}*7>cDJ`L#WuL^jy=bu%2Q_zDsFBe#|;i z&I&`Qh~gcc7QvRlND`HPi4;7<814mslph)f0bx-|gG5pUu%lQlQMBd!+Vl8Z7$(L} z@wNc0m> Date: Sun, 18 Feb 2024 23:20:53 +0530 Subject: [PATCH 13/18] home page logo changes --- corpus/templates/robotrix/home.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index 1799f950..2bf6a901 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -11,10 +11,11 @@ .hero { background-color: rgba(0, 0, 0, 0.6); - background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); + /* background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); */ background-size: cover; background-position: center; background-blend-mode: overlay; + height: 25%; } /* Small screens (default full width) */ @@ -23,8 +24,8 @@ max-width: 70%; } .hero { - background-size: cover; - /* background-image: url("{% static 'img/robotrix/robo_small.png' %}"); */ + background-size: contain; + background-image: url("{% static 'img/robotrix/robo_small.png' %}"); } } @@ -35,6 +36,7 @@ } .hero { background-size: contain; + background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); } } @@ -45,6 +47,7 @@ } .hero { background-size: 60%; /* Adjust the size based on your preference */ + background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); } } @@ -55,6 +58,7 @@ } .hero { background-size: 70%; /* Adjust the size based on your preference */ + background-image: url("{% static 'img/robotrix/robotrix_logo.png' %}"); } } From 56c1e9f5b09b496a567f4334e28f6bed698d20dc Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Sun, 18 Feb 2024 23:31:02 +0530 Subject: [PATCH 14/18] minor typo and other fixes --- corpus/robotrix/tests/__init__.py | 0 corpus/robotrix/tests/test_models.py | 0 corpus/robotrix/tests/test_urls.py | 80 ---------------------------- corpus/robotrix/tests/test_views.py | 13 ----- corpus/templates/robotrix/home.html | 2 +- corpus/templates/robotrix/index.html | 4 +- 6 files changed, 3 insertions(+), 96 deletions(-) delete mode 100644 corpus/robotrix/tests/__init__.py delete mode 100644 corpus/robotrix/tests/test_models.py delete mode 100644 corpus/robotrix/tests/test_urls.py delete mode 100644 corpus/robotrix/tests/test_views.py diff --git a/corpus/robotrix/tests/__init__.py b/corpus/robotrix/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/corpus/robotrix/tests/test_models.py b/corpus/robotrix/tests/test_models.py deleted file mode 100644 index e69de29b..00000000 diff --git a/corpus/robotrix/tests/test_urls.py b/corpus/robotrix/tests/test_urls.py deleted file mode 100644 index d34f493e..00000000 --- a/corpus/robotrix/tests/test_urls.py +++ /dev/null @@ -1,80 +0,0 @@ -from django.test import SimpleTestCase -from django.urls import resolve -from django.urls import reverse -from robotrix.views import add_member -from robotrix.views import admin -from robotrix.views import announcements_management -from robotrix.views import create_team -from robotrix.views import delete_announcement -from robotrix.views import delete_payment_proof -from robotrix.views import home -from robotrix.views import index -from robotrix.views import mark_payment_complete -from robotrix.views import mark_payment_incomplete -from robotrix.views import register -from robotrix.views import team_management -from robotrix.views import team_page -from robotrix.views import upload_payment_proof -from robotrix.views import user_management - - -class UrlsTestCase(SimpleTestCase): - def test_home_url_is_resolved(self): - url = reverse("robotrix_home") - self.assertEquals(resolve(url).func, home) - - def test_index_url_is_resolved(self): - url = reverse("robotrix_index") - self.assertEquals(resolve(url).func, index) - - def test_register_url_is_resolved(self): - url = reverse("robotrix_register") - self.assertEquals(resolve(url).func, register) - - def test_create_team_url_is_resolved(self): - url = reverse("robotrix_create_team") - self.assertEquals(resolve(url).func, create_team) - - def test_add_member_url_is_resolved(self): - url = reverse("robotrix_add_member2") - self.assertEquals(resolve(url).func, add_member) - - def test_upload_payment_proof_url_is_resolved(self): - url = reverse("robotrix_upload_payment_proof") - self.assertEquals(resolve(url).func, upload_payment_proof) - - def test_delete_payment_proof_url_is_resolved(self): - url = reverse("robotrix_delete_payment_proof") - self.assertEquals(resolve(url).func, delete_payment_proof) - - def test_admin_url_is_resolved(self): - url = reverse("robotrix_admin") - self.assertEquals(resolve(url).func, admin) - - def test_team_management_url_is_resolved(self): - url = reverse("robotrix_admin_teams") - self.assertEquals(resolve(url).func, team_management) - - def test_team_page_url_is_resolved(self): - url = reverse("robotrix_admin_team_page", args=[1]) - self.assertEquals(resolve(url).func, team_page) - - def test_user_management_url_is_resolved(self): - url = reverse("robotrix_admin_users") - self.assertEquals(resolve(url).func, user_management) - - def test_announcements_management_url_is_resolved(self): - url = reverse("robotrix_announcements") - self.assertEquals(resolve(url).func, announcements_management) - - def test_delete_announcement_url_is_resolved(self): - url = reverse("robotrix_delete_announcement", args=[1]) - self.assertEquals(resolve(url).func, delete_announcement) - - def test_mark_payment_complete_url_is_resolved(self): - url = reverse("robotrix_admin_mark_payment_complete", args=[1]) - self.assertEquals(resolve(url).func, mark_payment_complete) - - def test_mark_payment_incomplete_url_is_resolved(self): - url = reverse("robotrix_admin_mark_payment_incomplete", args=[1]) - self.assertEquals(resolve(url).func, mark_payment_incomplete) diff --git a/corpus/robotrix/tests/test_views.py b/corpus/robotrix/tests/test_views.py deleted file mode 100644 index 460d6492..00000000 --- a/corpus/robotrix/tests/test_views.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.test import Client -from django.test import TestCase -from django.urls import reverse - - -class ViewsTestCase(TestCase): - def setUp(self): - self.client = Client() - - def test_home_view_GET(self): - response = self.client.get(reverse("robotrix_home")) - self.assertEqual(response.status_code, 200) - self.assertTemplateUsed(response, "robotrix/home.html") diff --git a/corpus/templates/robotrix/home.html b/corpus/templates/robotrix/home.html index 2bf6a901..1371d09f 100644 --- a/corpus/templates/robotrix/home.html +++ b/corpus/templates/robotrix/home.html @@ -87,7 +87,7 @@

    Admin {% endif %} -

    A 24-Hour Robotics Hackathon



    +

    24-Hour Robotics Hackathon



    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    24th February - 10th March 2024

    diff --git a/corpus/templates/robotrix/index.html b/corpus/templates/robotrix/index.html index d9856431..5a90db09 100644 --- a/corpus/templates/robotrix/index.html +++ b/corpus/templates/robotrix/index.html @@ -69,9 +69,9 @@

    Robotrix

    -

    24-Hour Signal Processing Hackathon

    +

    24-Hour Robotics Hackathon

    NATIONAL INSTITUTE OF TECHNOLOGY KARNATAKA

    -

    10th - 13th January 2024

    +

    24th February - 10th March 2024

    {% comment %} Registrations Opening soon {% endcomment %}
    From c0b505225ed7718ca8d5d54dbe9f09c40fd31a28 Mon Sep 17 00:00:00 2001 From: Testing wala User Date: Sat, 24 Feb 2024 13:46:13 +0530 Subject: [PATCH 15/18] minor ui fixes on logo --- corpus/templates/components/navbar_large.html | 4 ++-- corpus/templates/components/navbar_small.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/corpus/templates/components/navbar_large.html b/corpus/templates/components/navbar_large.html index f107be82..69654b2c 100644 --- a/corpus/templates/components/navbar_large.html +++ b/corpus/templates/components/navbar_large.html @@ -1,8 +1,8 @@