summaryrefslogtreecommitdiff
path: root/docs/topics/forms/modelforms.txt
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2018-05-12 19:37:42 +0200
committerGitHub <noreply@github.com>2018-05-12 19:37:42 +0200
commit35319bf12ccefe1911588493484160aa49208f89 (patch)
treefe1cb029786e49622e6ba3af3ddf3dc9956502ff /docs/topics/forms/modelforms.txt
parent1b7d524cfa7b7834af26c99407af66be6813938d (diff)
Alphabetized imports in various docs.
Follow-up of d97cce34096043b019e818a7fb98c0f9f073704c and 7d3fe36c626a3268413eb86d37920f132eb4a54f.
Diffstat (limited to 'docs/topics/forms/modelforms.txt')
-rw-r--r--docs/topics/forms/modelforms.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt
index aa3c6855e2..270b88ff67 100644
--- a/docs/topics/forms/modelforms.txt
+++ b/docs/topics/forms/modelforms.txt
@@ -295,8 +295,8 @@ You can override the error messages from ``NON_FIELD_ERRORS`` raised by model
validation by adding the :data:`~django.core.exceptions.NON_FIELD_ERRORS` key
to the ``error_messages`` dictionary of the ``ModelForm``’s inner ``Meta`` class::
- from django.forms import ModelForm
from django.core.exceptions import NON_FIELD_ERRORS
+ from django.forms import ModelForm
class ArticleForm(ModelForm):
class Meta:
@@ -573,7 +573,7 @@ fields like you would in a regular ``Form``.
If you want to specify a field's validators, you can do so by defining
the field declaratively and setting its ``validators`` parameter::
- from django.forms import ModelForm, CharField
+ from django.forms import CharField, ModelForm
from myapp.models import Article
class ArticleForm(ModelForm):