We konden deze vermelding niet vinden. Er worden benaderende resultaten weergegeven. Controleer je spelling of stel voor deze term aan het woordenboek toe te voegen.
ModelForm
Par défaut, un formulaire ModelForm est créé dynamiquement pour les modèles.
By default a ModelForm is dynamically created for your model.
Ces vues génériques vont automatiquement créer un formulaire ModelForm, pour autant qu'elles puissent déterminer la classe de modèle à utiliser
These generic views will automatically create a ModelForm, so long as they can work out which model class to use
Sinon, une instance de formulaire ModelForm sera créée en se basant sur le modèle associé au contenu de queryset ou de model, en fonction de l'attribut qui est défini.
Otherwise, a ModelForm will be instantiated using the model associated with the queryset, or with the model, depending on which attribute is provided.
Tous les champs présents dans cette option (qui doit être une liste ou un tuple) afficheront leurs données en l'état et seront non modifiables ; ils seront également exclus du formulaire ModelForm utilisé pour la création et l'édition.
Any fields in this option (which should be a list or tuple) will display its data as-is and non-editable; they are also excluded from the ModelForm used for creating and editing.
Pour garder trace de l'utilisateur ayant créé un objet en utilisant CreateView, vous pouvez utiliser un formulaire ModelForm personnalisé.
To track the user that created an object using a CreateView, you can use a custom ModelForm to do this.
Si vous enregistrez un fichier dans un Model contenant un champ FileField, l'emploi d'un formulaire ModelForm simplifie le processus.
If you're saving a file on a Model with a FileField, using a ModelForm makes this process much easier.
Il n'est également pas possible d'inclure un champ BinaryField dans un formulaire ModelForm.
It is also not possible to include a BinaryField in a ModelForm. Abusing BinaryField
Notez que les validateurs ne sont pas exécutés automatiquement lorsque vous enregistrez un modèle, mais si vous utilisez un formulaire ModelForm, celui-ci applique les validateurs sur tous les champs inclus dans le formulaire.
Note that validators will not be run automatically when you save a model, but if you are using a ModelForm, it will run your validators on any fields that are included in your form.
Renvoie le champ de formulaire django.forms.Field utilisé par défaut pour ce champ dans un formulaire ModelForm.
Sinon, une instance de formulaire ModelForm sera créée en se basant sur le modèle associé au laquelle rediriger lorsque le formulaire est validé avec succès.
Otherwise, a ModelForm will be instantiated using the model associated with the queryset, or with the model, depending on which attribute is provided.
Andere resultaten
Vous pouvez trouver plus d'informations sur cette restriction, qui est aussi valable pour les formulaires ModelForm normaux, dans Sélection des champs à utiliser.
You can find more information about this restriction, which also holds for regular ModelForms, in Selecting the fields to use.
Modifier la largeur des éléments de formulaire créés avec ModelForm dans Django
Change the width of form elements created with ModelForm in Django
Lorsque vous créez une instance de formulaire explicitement comme ceci, il est important de comprendre comment les formulaires de type ModelForm et Form sont liés.
Note When you explicitly instantiate a form field like this, it is important to understand how ModelForm and regular Form are related.
Potentieel gevoelige of ongepaste informatie
Er worden alleen voorbeelden gegeven om u te helpen het woord of de woordcombinatie waarop u hebt gezocht, te vertalen. Deze worden niet door ons geselecteerd of gevalideerd en kunnen ongepaste taal bevatten. Wij vragen u melding te maken van voorbeelden die dienen te worden aangepast of verwijderd. Vertalingen met grof of informeel taalgebruik worden meestal rood of oranje gemarkeerd.