Django

Code

Ticket #7742 (closed: fixed)

Opened 5 months ago

Last modified 3 months ago

remove oldforms

Reported by: gwilson Assigned to: gwilson
Milestone: 1.0 Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

A ticket for tracking the removal of the django.oldforms package, which will be performed after all remaining oldforms dependencies have been removed. Work consists of:

  • Removing django.oldforms.
  • Removing oldforms documentation and all references to oldforms.

To follow/assist this work, see my bzr branch.

Attachments

7742.diff (141.0 kB) - added by gwilson on 08/13/08 02:08:56.
7742.2008-08-26.diff (139.9 kB) - added by gwilson on 08/26/08 00:19:16.
patch updated for docs and comments merge
7742.2008-08-26.2.diff (154.9 kB) - added by brosner on 08/26/08 11:55:28.
7742.2008-08-26.3.diff (154.4 kB) - added by brosner on 08/26/08 12:12:50.

Change History

07/18/08 18:43:09 changed by Simon Greenhill

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

07/22/08 10:00:38 changed by mir

Since the comment system will continue to use oldforms in 1.0, shouldn't this be a post-1.0?

07/22/08 18:30:55 changed by russellm

mir: Comments is one of the special cases. Thejaswi Puthraya is working on comments as part of the GSOC; unless I've missed a memo, this is still on the cards to happen.

08/03/08 21:24:22 changed by gwilson

oldforms is still being used in the following locations:

  • django.contrib.admin.views.template - template_validator view and TemplateValidator manipulator class.
  • django.contrib.comments.views.comments - multiple forms.
  • In the methods prepare_field_objs_and_params and get_manipulator_field_objs in the following files:
    • django.contrib.contenttypes.generic - GenericRelation model field subclass.
    • django.db.models.__init__
    • django.db.models.related
    • django.db.models.manipulators

Also, while not using the oldforms package directly, the following model field methods (noted by Russell on #7830) are related to oldforms:

  • get_manipulator_field_names()
  • get_manipulator_fields()
  • get_manipulator_new_data()
  • flatten_data()
  • get_choices()
  • get_choices_default()

08/10/08 23:06:53 changed by gwilson

  • status changed from new to assigned.

08/10/08 23:28:33 changed by gwilson

(In [8292]) Refs #7742 -- newforms-admin does not use oldforms validator_list argument, made a custom FlatPageForm to check the entered URL.

08/10/08 23:30:30 changed by gwilson

(In [8293]) Refs #7742 -- Removed unused validator_list argument (this is already being checked by the UserCreationForm).

08/10/08 23:33:27 changed by gwilson

(In [8295]) Refs #7742 -- Removed oldforms bits from contrib.gis app.

08/13/08 02:08:29 changed by gwilson

I'm attaching a patch to see what this is looking like. contrib.comments is still blocking this, and I haven't yet looked into whether get_choices and get_default_choices can be removed or not.

08/13/08 02:08:56 changed by gwilson

  • attachment 7742.diff added.

08/14/08 00:03:13 changed by mtredinnick

  • milestone changed from 1.0 beta to 1.0.

The remaining portions of this are no longer 1.0-beta. Changing the milestone (ideally to 1.0-ASAP :-) ).

08/26/08 00:19:16 changed by gwilson

  • attachment 7742.2008-08-26.diff added.

patch updated for docs and comments merge

08/26/08 00:32:21 changed by gwilson

Here's my commit message draft:

Removed oldforms and oldforms-related code:

  • Removed Manipulator, AutomaticManipulator, and related classes.
  • Removed oldforms specific bits from model fields:
    • Removed validator_list argument in constructors.
    • Removed the methods:
      • get_manipulator_field_names
      • get_manipulator_field_objs
      • get_manipulator_fields
      • get_manipulator_new_data
      • prepare_field_objs_and_params
      • get_follow
    • Renamed flatten_data method to get_string_value for better alignment with its use by the serialization framework, which was the only remaining code using flatten_data.
  • Removed oldforms methods from django.db.models.Options class: get_followed_related_objects, get_data_holders, get_follow, and has_field_type.
  • Serialization framework
    • Serializer.get_string_value now calls the model fields' renamed get_string_value methods.
    • Removed a special-casing of models.DateTimeField in core.serializers.base.Serializer.get_string_value that's handled by django.db.models.fields.DateTimeField.get_string_value.
  • Introduced a SlugField? form field for validation (refs #8040).
  • Removed an oldforms-style model creation hack (refs #2160).

(follow-up: ↓ 14 ) 08/26/08 00:42:46 changed by brosner

I don't see the reason why we should still accept core. It is no longer used in the admin.

08/26/08 09:42:22 changed by anonymous

  • has_patch set to 1.

(in reply to: ↑ 12 ) 08/26/08 10:20:43 changed by kmtracey

Replying to brosner:

I don't see the reason why we should still accept core. It is no longer used in the admin.

Yes, I was wondering why it was still documented, even in the new docs:

http://docs.djangoproject.com/en/dev/ref/models/fields/#common-model-field-options

It needs to be made go away, I think. It's now both confusing and useless?

08/26/08 11:19:23 changed by jacob

Indeed - Gary, you can add removing core and its documentation to this patch; from there I don't see anything else that you need to wait on to commit this.

08/26/08 11:55:28 changed by brosner

  • attachment 7742.2008-08-26.2.diff added.

08/26/08 11:58:59 changed by brosner

I have updated the patch to remove core and the various admin options that needed to get removed. Also I noticed that there was revert of [8477]. Gary, the second to last item in your commit message draft was fixed.

08/26/08 12:00:56 changed by brosner

Hrm, whoops should git svn rebase a bit more often. Let me attach a fixed patch. I noticed a couple more things.

08/26/08 12:12:50 changed by brosner

  • attachment 7742.2008-08-26.3.diff added.

08/26/08 12:32:28 changed by brosner

Here is a revised commit message draft that can be used.

Removed oldforms and oldforms-related code:

  • Removed Manipulator, AutomaticManipulator, and related classes.
  • Removed oldforms specific bits from model fields:
    • Removed validator_list argument in constructors.
    • Removed the methods:
      • get_manipulator_field_names
      • get_manipulator_field_objs
      • get_manipulator_fields
      • get_manipulator_new_data
      • prepare_field_objs_and_params
      • get_follow
    • Renamed flatten_data method to get_string_value for better alignment with its use by the serialization framework, which was the only remaining code using flatten_data.
  • Removed oldforms methods from django.db.models.Options class: get_followed_related_objects, get_data_holders, get_follow, and has_field_type.
  • Removed oldforms-admin specific options: core, num_in_admin, min_num_in_admin, max_num_in_admin, num_extra_on_change, edit_inline
  • Serialization framework
    • Serializer.get_string_value now calls the model fields' renamed get_string_value methods.
    • Removed a special-casing of models.DateTimeField in core.serializers.base.Serializer.get_string_value that's handled by django.db.models.fields.DateTimeField.get_string_value.
  • Removed an oldforms-style model creation hack (refs #2160).

08/27/08 02:35:13 changed by gwilson

  • status changed from assigned to closed.
  • resolution set to fixed.

fixed in [8616].


Add/Change #7742 (remove oldforms)




Change Properties
Action