diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-10 21:10:47 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2008-08-10 21:10:47 +0000 |
| commit | ef48a3e69c02438db32f20531f5c679e8315d528 (patch) | |
| tree | a60f57ad406aaa674ee8c742947872d2efc12cf4 /django/views | |
| parent | 94e8f4fb358fe39a67456f23f92eacd6f83e302d (diff) | |
Fixed #7830 -- Removed all of the remaining, deprecated, non-oldforms features:
* Support for representing files as strings was removed. Use `django.core.files.base.ContentFile` instead.
* Support for representing uploaded files as dictionaries was removed. Use `django.core.files.uploadedfile.SimpleUploadedFile` instead.
* The `filename`, `file_name`, `file_size`, and `chuck` properties of `UploadedFile` were removed. Use the `name`, `name`, `size`, and `chunks` properties instead, respectively.
* The `get_FIELD_filename`, `get_FIELD_url`, `get_FIELD_size`, and `save_FIELD_file` methods for Models with `FileField` fields were removed. Instead, use the `path`, `url`, and `size` attributes and `save` method on the field itself, respectively.
* The `get_FIELD_width` and `get_FIELD_height` methods for Models with `ImageField` fields were removed. Use the `width` and `height` attributes on the field itself instead.
* The dispatcher `connect`, `disconnect`, `send`, and `sendExact` functions were removed. Use the signal object's own `connect`, `disconnect`, `send`, and `send` methods instead, respectively.
* The `form_for_model` and `form_for_instance` functions were removed. Use a `ModelForm` subclass instead.
* Support for importing `django.newforms` was removed. Use `django.forms` instead.
* Support for importing `django.utils.images` was removed. Use `django.core.files.images` instead.
* Support for the `follow` argument in the `create_object` and `update_object` generic views was removed. Use the `django.forms` package and the new `form_class` argument instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/generic/create_update.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/django/views/generic/create_update.py b/django/views/generic/create_update.py index aaa0bdc4b6..634fb1bdcd 100644 --- a/django/views/generic/create_update.py +++ b/django/views/generic/create_update.py @@ -7,19 +7,6 @@ from django.utils.translation import ugettext from django.contrib.auth.views import redirect_to_login from django.views.generic import GenericViewError -def deprecate_follow(follow): - """ - Issues a DeprecationWarning if follow is anything but None. - - The old Manipulator-based forms used a follow argument that is no longer - needed for newforms-based forms. - """ - if follow is not None: - import warnings - msg = ("Generic views have been changed to use newforms, and the" - " 'follow' argument is no longer used. Please update your code" - " to not use the 'follow' argument.") - warnings.warn(msg, DeprecationWarning, stacklevel=3) def apply_extra_context(extra_context, context): """ @@ -105,8 +92,7 @@ def lookup_object(model, object_id, slug, slug_field): def create_object(request, model=None, template_name=None, template_loader=loader, extra_context=None, post_save_redirect=None, - login_required=False, follow=None, context_processors=None, - form_class=None): + login_required=False, context_processors=None, form_class=None): """ Generic object-creation function. @@ -115,7 +101,6 @@ def create_object(request, model=None, template_name=None, form the form for the object """ - deprecate_follow(follow) if extra_context is None: extra_context = {} if login_required and not request.user.is_authenticated(): return redirect_to_login(request.path) @@ -143,9 +128,9 @@ def create_object(request, model=None, template_name=None, def update_object(request, model=None, object_id=None, slug=None, slug_field='slug', template_name=None, template_loader=loader, - extra_context=None, post_save_redirect=None, - login_required=False, follow=None, context_processors=None, - template_object_name='object', form_class=None): + extra_context=None, post_save_redirect=None, login_required=False, + context_processors=None, template_object_name='object', + form_class=None): """ Generic object-update function. @@ -156,7 +141,6 @@ def update_object(request, model=None, object_id=None, slug=None, object the original object being edited """ - deprecate_follow(follow) if extra_context is None: extra_context = {} if login_required and not request.user.is_authenticated(): return redirect_to_login(request.path) |
