diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-07-19 01:22:26 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-07-19 01:22:26 +0000 |
| commit | 46786b4193e04d398532bbfc3dcf63c03c1793cb (patch) | |
| tree | 8dfb9330ca0e377d89c29e3f67076231bbbbbc05 /tests/modeltests/model_forms | |
| parent | 39af2738fd64ba7f4c4af0783590e2b2b7b88460 (diff) | |
Fixed #7741: django.newforms is now django.forms. This is obviously a backwards-incompatible change. There's a warning upon import of django.newforms itself, but deeper imports will raise errors.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/modeltests/model_forms')
| -rw-r--r-- | tests/modeltests/model_forms/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index 6838f11d4e..cc9efd0f94 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -79,8 +79,8 @@ class ImageFile(models.Model): return self.description __test__ = {'API_TESTS': """ ->>> from django import newforms as forms ->>> from django.newforms.models import ModelForm +>>> from django import forms +>>> from django.forms.models import ModelForm >>> from django.core.files.uploadedfile import SimpleUploadedFile The bare bones, absolutely nothing custom, basic case. @@ -113,7 +113,7 @@ Replacing a field. ... model = Category >>> CategoryForm.base_fields['url'].__class__ -<class 'django.newforms.fields.BooleanField'> +<class 'django.forms.fields.BooleanField'> Using 'fields'. @@ -211,7 +211,7 @@ We can also subclass the Meta inner class to change the fields list. # Old form_for_x tests ####################################################### ->>> from django.newforms import ModelForm, CharField +>>> from django.forms import ModelForm, CharField >>> import datetime >>> Category.objects.all() @@ -605,7 +605,7 @@ the data in the database when the form is instantiated. # ModelChoiceField ############################################################ ->>> from django.newforms import ModelChoiceField, ModelMultipleChoiceField +>>> from django.forms import ModelChoiceField, ModelMultipleChoiceField >>> f = ModelChoiceField(Category.objects.all()) >>> list(f.choices) |
