#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)
Change History (24)
comment:1 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 17 years ago
comment:3 by , 17 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 , 17 years ago
oldforms is still being used in the following locations:
django.contrib.admin.views.template-template_validatorview andTemplateValidatormanipulator class.django.contrib.comments.views.comments- multiple forms.- In the methods
prepare_field_objs_and_paramsandget_manipulator_field_objsin the following files:django.contrib.contenttypes.generic-GenericRelationmodel field subclass.django.db.models.__init__django.db.models.relateddjango.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 , 17 years ago
| Status: | new → assigned |
|---|
comment:6 by , 17 years ago
comment:7 by , 17 years ago
comment:9 by , 17 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 , 17 years ago
comment:10 by , 17 years ago
| milestone: | 1.0 beta → 1.0 |
|---|
The remaining portions of this are no longer 1.0-beta. Changing the milestone (ideally to 1.0-ASAP :-) ).
comment:11 by , 17 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_listargument in constructors. - Removed the methods:
get_manipulator_field_namesget_manipulator_field_objsget_manipulator_fieldsget_manipulator_new_dataprepare_field_objs_and_paramsget_follow
- Renamed
flatten_datamethod toget_string_valuefor better alignment with its use by the serialization framework, which was the only remaining code usingflatten_data.
- Removed
- Removed oldforms methods from
django.db.models.Optionsclass:get_followed_related_objects,get_data_holders,get_follow, andhas_field_type. - Serialization framework
Serializer.get_string_valuenow calls the model fields' renamedget_string_valuemethods.- Removed a special-casing of
models.DateTimeFieldincore.serializers.base.Serializer.get_string_valuethat's handled bydjango.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 comment:12 by , 17 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 , 17 years ago
| Has patch: | set |
|---|
comment:14 by , 17 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 , 17 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 , 17 years ago
| Attachment: | 7742.2008-08-26.2.diff added |
|---|
comment:16 by , 17 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 , 17 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 , 17 years ago
| Attachment: | 7742.2008-08-26.3.diff added |
|---|
comment:18 by , 17 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_listargument in constructors. - Removed the methods:
get_manipulator_field_namesget_manipulator_field_objsget_manipulator_fieldsget_manipulator_new_dataprepare_field_objs_and_paramsget_follow
- Renamed
flatten_datamethod toget_string_valuefor better alignment with its use by the serialization framework, which was the only remaining code usingflatten_data.
- Removed
- Removed oldforms methods from
django.db.models.Optionsclass:get_followed_related_objects,get_data_holders,get_follow, andhas_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_valuenow calls the model fields' renamedget_string_valuemethods.- Removed a special-casing of
models.DateTimeFieldincore.serializers.base.Serializer.get_string_valuethat's handled bydjango.db.models.fields.DateTimeField.get_string_value.
- Removed an oldforms-style model creation hack (refs #2160).
Since the comment system will continue to use oldforms in 1.0, shouldn't this be a post-1.0?