Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion home/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ class about_Admin(ImportExportMixin, admin.ModelAdmin):
"room_no",
"degree",
"department",
"allocation_enabled"
"allocation_enabled",
),
"description": "%s" % STUDENT_DESC_TEXT,
},
Expand Down Expand Up @@ -407,6 +407,7 @@ def get_rebate_days_per_caterer(self, request, queryset: list[LongRebate]):
class about_Admin(ImportExportModelAdmin, admin.ModelAdmin):
resource_class = RebateResource
model = Rebate
autocomplete_fields = ["email"]
search_fields = (
"allocation_id__student_id",
"approved",
Expand Down Expand Up @@ -824,6 +825,7 @@ class about_Admin(ImportExportModelAdmin, admin.ModelAdmin):
list_per_page = 500
resource_class = AllocationResource
model = Allocation
autocomplete_fields = ["email"]
search_fields = (
"email__name",
"email__roll_no",
Expand Down
18 changes: 18 additions & 0 deletions home/migrations/0004_alter_student_room_no.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.0.8 on 2024-12-28 13:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('home', '0003_student_allocation_enabled'),
]

operations = [
migrations.AlterField(
model_name='student',
name='room_no',
field=models.CharField(blank=True, default='', help_text='This contains the room number of the Student', max_length=10, null=True, verbose_name='Room Number of Student'),
),
]
4 changes: 2 additions & 2 deletions home/models/students.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ class Student(models.Model):
)
room_no = models.CharField(
_("Room Number of Student"),
max_length=5,
max_length=10,
help_text="This contains the room number of the Student",
null=True,
default="",
blank=True,
)
allocation_enabled = models.BooleanField(
default=True,
help_text="Indicates if the student is allowed to participate in the allocation process"
help_text="Indicates if the student is allowed to participate in the allocation process",
)

def __str__(self):
Expand Down
Loading