Skip to content

Commit

Permalink
chages made in models
Browse files Browse the repository at this point in the history
  • Loading branch information
TRISHANT131104 committed Sep 12, 2023
1 parent b055bf9 commit e702ccf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion home/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class about_Admin(admin.ModelAdmin):
class about_Admin(admin.ModelAdmin):
model = Caterer
search_fields = ("name",)
list_filter = ("name",)
list_filter = ("id","name",)
fieldsets = (
(
None,
Expand Down
2 changes: 1 addition & 1 deletion home/models/Semesters/autumn22.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CatererBillsAutumn22(models.Model):
period6_bills = models.IntegerField(_("Period 6 Bill"),default=0, null=True)

def __str__(self):
return str(self.caterer.name)
return str(self.caterer.pk)

class Meta:
verbose_name = "Caterer Bill Autumn 2022"
Expand Down
2 changes: 1 addition & 1 deletion home/models/Semesters/spring23.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class CatererBillsSpring23(models.Model):
period6_bills = models.IntegerField(_("Period 6 Bill"),default=0, null=True)

def __str__(self):
return str(self.caterer.name)
return str(self.caterer.pk)

class Meta:
verbose_name = "Caterer Bill Spring 2023"
Expand Down
4 changes: 2 additions & 2 deletions home/models/students.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Student(models.Model):

name = models.CharField(
_("Name of Student"),
max_length=30,
max_length=50,
help_text="This contains the name of the Student",
)
email = models.CharField(max_length=30, default="")
Expand All @@ -21,7 +21,7 @@ class Student(models.Model):
)
department = models.CharField(
_("Department of Student"),
max_length=30,
max_length=50,
help_text="This contains the department of the Student",
null=True,
)
Expand Down

0 comments on commit e702ccf

Please sign in to comment.