mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Improved customuser admin.py
This commit is contained in:
parent
aeecd1a77c
commit
df2f172813
1 changed files with 1 additions and 3 deletions
|
@ -13,9 +13,7 @@ class CustomUserForm(forms.ModelForm):
|
|||
super(CustomUserForm, self).__init__(*args, **kwargs)
|
||||
if self.instance:
|
||||
self.fields['subjects'].queryset = SubjectInstance.objects.filter(
|
||||
course=self.instance.course).filter(
|
||||
year_level=self.instance.year_level).filter(
|
||||
semester=self.instance.semester)
|
||||
course=self.instance.course)
|
||||
|
||||
year_level = forms.ModelChoiceField(
|
||||
queryset=Year_Level.objects.all(), required=False)
|
||||
|
|
Loading…
Reference in a new issue