Forms documentation¶
Gestion app forms¶
-
class
gestion.forms.
GenerateReleveForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to generate a releve.
-
base_fields
= {'begin': <django.forms.fields.DateTimeField object>, 'end': <django.forms.fields.DateTimeField object>}¶
-
declared_fields
= {'begin': <django.forms.fields.DateTimeField object>, 'end': <django.forms.fields.DateTimeField object>}¶
-
media
¶
-
-
class
gestion.forms.
GestionForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form for the
manage()
view.-
base_fields
= {'client': <django.forms.models.ModelChoiceField object>, 'product': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'client': <django.forms.models.ModelChoiceField object>, 'product': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
gestion.forms.
KegForm
(*args, **kwargs)¶ A form to create and edit a
Keg
.-
class
Meta
¶ -
exclude
= ('is_active',)¶
-
model
¶ alias of
gestion.models.Keg
-
widgets
= {'amount': <class 'django.forms.widgets.TextInput'>}¶
-
-
base_fields
= {'amount': <django.forms.fields.DecimalField object>, 'barcode': <django.forms.fields.CharField object>, 'capacity': <django.forms.fields.IntegerField object>, 'demi': <django.forms.models.ModelChoiceField object>, 'galopin': <django.forms.models.ModelChoiceField object>, 'name': <django.forms.fields.CharField object>, 'pinte': <django.forms.models.ModelChoiceField object>, 'stockHold': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
gestion.forms.
MenuForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ A form to create and edit a
Menu
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶ alias of
gestion.models.Menu
-
widgets
= {'amount': <class 'django.forms.widgets.TextInput'>}¶
-
-
base_fields
= {'amount': <django.forms.fields.DecimalField object>, 'articles': <django.forms.models.ModelMultipleChoiceField object>, 'barcode': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
gestion.forms.
PinteForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to free
Pints
.-
base_fields
= {'begin': <django.forms.fields.IntegerField object>, 'end': <django.forms.fields.IntegerField object>, 'ids': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'begin': <django.forms.fields.IntegerField object>, 'end': <django.forms.fields.IntegerField object>, 'ids': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
gestion.forms.
ProductForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ A form to create and edit a
Product
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶ alias of
gestion.models.Product
-
widgets
= {'amount': <class 'django.forms.widgets.TextInput'>}¶
-
-
base_fields
= {'adherentRequired': <django.forms.fields.BooleanField object>, 'amount': <django.forms.fields.DecimalField object>, 'barcode': <django.forms.fields.CharField object>, 'category': <django.forms.fields.TypedChoiceField object>, 'deg': <django.forms.fields.DecimalField object>, 'is_active': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>, 'needQuantityButton': <django.forms.fields.BooleanField object>, 'showingMultiplier': <django.forms.fields.IntegerField object>, 'stockBar': <django.forms.fields.IntegerField object>, 'stockHold': <django.forms.fields.IntegerField object>, 'volume': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
gestion.forms.
RefundForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ A form to create a
Refund
.-
class
Meta
¶ -
fields
= ('customer', 'amount')¶
-
model
¶ alias of
gestion.models.Refund
-
widgets
= {'amount': <class 'django.forms.widgets.TextInput'>, 'customer': <dal_select2.widgets.ModelSelect2 object>}¶
-
-
base_fields
= {'amount': <django.forms.fields.DecimalField object>, 'customer': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
gestion.forms.
ReloadForm
(*args, **kwargs)¶ A form to create a
Reload
.-
class
Meta
¶ -
fields
= ('customer', 'amount', 'PaymentMethod')¶
-
model
¶ alias of
gestion.models.Reload
-
widgets
= {'amount': <class 'django.forms.widgets.TextInput'>, 'customer': <dal_select2.widgets.ModelSelect2 object>}¶
-
-
base_fields
= {'PaymentMethod': <django.forms.models.ModelChoiceField object>, 'amount': <django.forms.fields.DecimalField object>, 'customer': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
gestion.forms.
SearchMenuForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to search a
Menu
.-
base_fields
= {'menu': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'menu': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
gestion.forms.
SearchProductForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to search a
Product
.-
base_fields
= {'product': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'product': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
gestion.forms.
SelectActiveKegForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to search an active
Keg
.-
base_fields
= {'keg': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'keg': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
gestion.forms.
SelectPositiveKegForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ A form to search a
Keg
with a positive stockhold.-
base_fields
= {'keg': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'keg': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
Users app forms¶
-
class
users.forms.
CreateGroupForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to create a new group (
django.contrib.auth.models.Group
).-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
CreateUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to create a new user (
django.contrib.auth.models.User
).-
class
Meta
¶ -
fields
= ('username', 'last_name', 'first_name', 'email')¶
-
model
¶ alias of
django.contrib.auth.models.User
-
-
base_fields
= {'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'last_name': <django.forms.fields.CharField object>, 'school': <django.forms.models.ModelChoiceField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'school': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
class
-
class
users.forms.
EditGroupForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to edit a group (
django.contrib.auth.models.Group
).-
base_fields
= {'name': <django.forms.fields.CharField object>, 'permissions': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
EditPasswordForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to change the password of a user (
django.contrib.auth.models.User
).-
base_fields
= {'password': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
clean_password2
()¶ Verify if the two new passwords are identical
-
declared_fields
= {'password': <django.forms.fields.CharField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
users.forms.
ExportForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to export list of users (
django.contrib.auth.models.User
) to csv file-
FIELDS_CHOICES
= (('username', "Nom d'utilisateur"), ('last_name', 'Nom'), ('first_name', 'Prénom'), ('email', 'Adresse mail'), ('school', 'École'), ('balance', 'Solde'), ('credit', 'Crédit'), ('debit', 'Débit'))¶
-
QUERY_TYPE_CHOICES
= (('all', 'Tous les comptes'), ('all_active', 'Tous les comptes actifs'), ('adherent', 'Tous les adhérents'), ('adherent_active', 'Tous les adhérents actifs'))¶
-
base_fields
= {'fields': <django.forms.fields.MultipleChoiceField object>, 'group': <django.forms.models.ModelChoiceField object>, 'query_type': <django.forms.fields.ChoiceField object>}¶
-
declared_fields
= {'fields': <django.forms.fields.MultipleChoiceField object>, 'group': <django.forms.models.ModelChoiceField object>, 'query_type': <django.forms.fields.ChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
GroupsEditForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to edit a user’s list of groups (
django.contrib.auth.models.User
anddjango.contrib.auth.models.Group
).-
base_fields
= {'groups': <django.forms.models.ModelMultipleChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
-
class
users.forms.
LoginForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to log in.
-
base_fields
= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
declared_fields
= {'password': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}¶
-
media
¶
-
-
class
users.forms.
SchoolForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to add and edit a
users.models.School
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶ alias of
users.models.School
-
-
base_fields
= {'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
users.forms.
SelectNonAdminUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to select a user from all non-staff users (
django.contrib.auth.models.User
).-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
SelectNonSuperUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to select a user from all non-superuser users (
django.contrib.auth.models.User
).-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
SelectUserForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)¶ Form to select a user from all users (
django.contrib.auth.models.User
).-
base_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {'user': <django.forms.models.ModelChoiceField object>}¶
-
media
¶
-
-
class
users.forms.
addCotisationHistoryForm
(*args, **kwargs)¶ Form to add a
users.models.CotisationHistory
to user (django.contrib.auth.models.User
).-
class
Meta
¶ -
fields
= ('cotisation', 'paymentMethod')¶
-
model
¶ alias of
users.models.CotisationHistory
-
-
base_fields
= {'cotisation': <django.forms.models.ModelChoiceField object>, 'paymentMethod': <django.forms.models.ModelChoiceField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
users.forms.
addWhiteListHistoryForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to add a
users.models.WhiteListHistory
to user (django.contrib.auth.models.User
).-
class
Meta
¶ -
fields
= ('duration',)¶
-
model
¶ alias of
users.models.WhiteListHistory
-
-
base_fields
= {'duration': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
Preferences app forms¶
-
class
preferences.forms.
CotisationForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to add and edit
Cotisation
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶ alias of
preferences.models.Cotisation
-
-
base_fields
= {'amount': <django.forms.fields.DecimalField object>, 'duration': <django.forms.fields.IntegerField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
preferences.forms.
GeneralPreferencesForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to edit the
GeneralPreferences
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶
-
widgets
= {'active_message': <django.forms.widgets.Textarea object>, 'brewer': <django.forms.widgets.TextInput object>, 'global_message': <django.forms.widgets.Textarea object>, 'grocer': <django.forms.widgets.TextInput object>, 'home_text': <django.forms.widgets.Textarea object>, 'president': <django.forms.widgets.TextInput object>, 'secretary': <django.forms.widgets.TextInput object>, 'treasurer': <django.forms.widgets.TextInput object>, 'vice_president': <django.forms.widgets.TextInput object>}¶
-
-
base_fields
= {'active_message': <django.forms.fields.CharField object>, 'automatic_logout_time': <django.forms.fields.IntegerField object>, 'brewer': <django.forms.fields.CharField object>, 'floating_buttons': <django.forms.fields.BooleanField object>, 'global_message': <django.forms.fields.CharField object>, 'grocer': <django.forms.fields.CharField object>, 'home_text': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'lost_pintes_allowed': <django.forms.fields.IntegerField object>, 'menu': <django.forms.fields.FileField object>, 'president': <django.forms.fields.CharField object>, 'rules': <django.forms.fields.FileField object>, 'secretary': <django.forms.fields.CharField object>, 'statutes': <django.forms.fields.FileField object>, 'treasurer': <django.forms.fields.CharField object>, 'use_pinte_monitoring': <django.forms.fields.BooleanField object>, 'vice_president': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class
-
class
preferences.forms.
PaymentMethodForm
(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)¶ Form to add and edit
PaymentMethod
.-
class
Meta
¶ -
fields
= '__all__'¶
-
model
¶ alias of
preferences.models.PaymentMethod
-
-
base_fields
= {'affect_balance': <django.forms.fields.BooleanField object>, 'icon': <django.forms.fields.CharField object>, 'is_active': <django.forms.fields.BooleanField object>, 'is_usable_in_cotisation': <django.forms.fields.BooleanField object>, 'is_usable_in_reload': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>}¶
-
declared_fields
= {}¶
-
media
¶
-
class