manuels-scolaires/manuels/forms.py

20 lines
508 B
Python
Raw Normal View History

2018-05-21 22:23:53 +02:00
from django import forms
from manuels.models import Book, SuppliesRequirement
2018-05-21 22:23:53 +02:00
class AddBookForm(forms.ModelForm):
class Meta:
model = Book
fields = '__all__'
2018-05-21 23:12:35 +02:00
add_another = forms.BooleanField(label='Ajouter un autre livre', required=False, initial=True)
class AddSuppliesForm(forms.ModelForm):
class Meta:
model = SuppliesRequirement
fields = '__all__'
add_another = forms.BooleanField(label="Ajouter d'autres fournitures", required=False, initial=True)