Skip to content

Commit

Permalink
Merge pull request #31 from TRISHANT131104/main
Browse files Browse the repository at this point in the history
change in models
  • Loading branch information
mittal-ishaan authored Sep 13, 2023
2 parents c47e681 + e702ccf commit ad42a6c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.env
.vscode

venv
__pycache__
db.sqlite3
migrations
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
2 changes: 1 addition & 1 deletion templates/allocationForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h4 class="px-5 mx-5">
if(second_pref[i].checked){
cat_list[i]++;
}
if(third_pref.length==first_pref.length && [i].checked){
if(third_pref.length==first_pref.length && third_pref[i].checked){
cat_list[i]++;
}
}
Expand Down

0 comments on commit ad42a6c

Please sign in to comment.