mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-05-23 03:55:48 +00:00
parent
8f14e64701
commit
94c3d5bd21
1 changed files with 10 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ from django import forms
|
|||
|
||||
from django_select2 import *
|
||||
|
||||
from .models import Employee, Dept, ClassRoom, Lab, Word
|
||||
from .models import Employee, Dept, ClassRoom, Lab, Word, School
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
|
|
@ -78,7 +78,14 @@ class SelfMultiChoices(AutoSelect2MultipleField):
|
|||
|
||||
return (NO_ERR_RESP, False, res)
|
||||
|
||||
########### Forms ##############
|
||||
########### Forms ##############]
|
||||
|
||||
class SchoolForm(forms.ModelForm):
|
||||
|
||||
classes = ClassRoomChoices()
|
||||
|
||||
class Meta:
|
||||
model = School
|
||||
|
||||
class EmployeeForm(forms.ModelForm):
|
||||
manager = EmployeeChoices(required=False)
|
||||
|
|
|
|||
Loading…
Reference in a new issue