Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7742 closed (fixed)

remove oldforms

Reported by: Gary Wilson Owned by: Gary Wilson
Component: Core (Other) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 (4)

7742.diff (141.0 KB ) - added by Gary Wilson 16 years ago.
7742.2008-08-26.diff (139.9 KB ) - added by Gary Wilson 16 years ago.
patch updated for docs and comments merge
7742.2008-08-26.2.diff (154.9 KB ) - added by Brian Rosner 16 years ago.
7742.2008-08-26.3.diff (154.4 KB ) - added by Brian Rosner 16 years ago.

Download all attachments as: .zip

Change History (24)

comment:1 by Simon Greenhill, 16 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Michael Radziej, 16 years ago

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

comment:3 by Russell Keith-Magee, 16 years ago

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.

comment:4 by Gary Wilson, 16 years ago

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()

comment:5 by Gary Wilson, 16 years ago

Status: newassigned

comment:6 by Gary Wilson, 16 years ago

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

comment:7 by Gary Wilson, 16 years ago

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

comment:8 by Gary Wilson, 16 years ago

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

comment:9 by Gary Wilson, 16 years ago

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.

by Gary Wilson, 16 years ago

Attachment: 7742.diff added

comment:10 by Malcolm Tredinnick, 16 years ago

milestone: 1.0 beta1.0

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

by Gary Wilson, 16 years ago

Attachment: 7742.2008-08-26.diff added

patch updated for docs and comments merge

comment:11 by Gary Wilson, 16 years ago

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).

comment:12 by Brian Rosner, 16 years ago

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

comment:13 by anonymous, 16 years ago

Has patch: set

in reply to:  12 comment:14 by Karen Tracey, 16 years ago

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?

comment:15 by Jacob, 16 years ago

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.

by Brian Rosner, 16 years ago

Attachment: 7742.2008-08-26.2.diff added

comment:16 by Brian Rosner, 16 years ago

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.

comment:17 by Brian Rosner, 16 years ago

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

by Brian Rosner, 16 years ago

Attachment: 7742.2008-08-26.3.diff added

comment:18 by Brian Rosner, 16 years ago

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).

comment:19 by Gary Wilson, 16 years ago

Resolution: fixed
Status: assignedclosed

fixed in [8616].

comment:20 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top