28 lines
709 B
Python
28 lines
709 B
Python
|
|
from django import forms
|
|
from django.contrib.admin import widgets
|
|
from django.forms import (
|
|
BaseInlineFormSet,
|
|
Form,
|
|
HiddenInput,
|
|
ModelForm,
|
|
ModelMultipleChoiceField,
|
|
ModelChoiceField,
|
|
ChoiceField,
|
|
CharField,
|
|
ValidationError,
|
|
modelformset_factory,
|
|
CheckboxSelectMultiple
|
|
)
|
|
|
|
from rcr.models import Item, Category, Level
|
|
from django.contrib.auth.models import User
|
|
|
|
class ItemForm(ModelForm):
|
|
class Meta:
|
|
model = Item
|
|
exclude = ["rcr_platform_id", "name", "assessed_by", "assessed_date", "assigned_to"]
|
|
#fields = ["category", "level"]
|
|
|
|
class AssessorAssignmentForm(Form):
|
|
items = ModelMultipleChoiceField(queryset=Item.objects.all()) |