diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-05-12 19:37:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-12 19:37:42 +0200 |
| commit | 35319bf12ccefe1911588493484160aa49208f89 (patch) | |
| tree | fe1cb029786e49622e6ba3af3ddf3dc9956502ff /docs/topics/forms | |
| parent | 1b7d524cfa7b7834af26c99407af66be6813938d (diff) | |
Alphabetized imports in various docs.
Follow-up of d97cce34096043b019e818a7fb98c0f9f073704c and 7d3fe36c626a3268413eb86d37920f132eb4a54f.
Diffstat (limited to 'docs/topics/forms')
| -rw-r--r-- | docs/topics/forms/index.txt | 2 | ||||
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 173bcb1942..f8ef20a9bc 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -279,8 +279,8 @@ want it to be published: .. snippet:: :filename: views.py - from django.shortcuts import render from django.http import HttpResponseRedirect + from django.shortcuts import render from .forms import NameForm 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): |
