lp:~berdario/django/propertyfields

Created by Dario Bertini and last modified
Get this branch:
bzr branch lp:~berdario/django/propertyfields
Only Dario Bertini can upload to this branch. If you are Dario Bertini please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Dario Bertini
Project:
Django
Status:
Development

Recent revisions

10646. By Dario Bertini

Fixed a bug about not using the true model in which the PropertyField was defined, but was instead used its inner field's
thus causing problems when using a PropertyField on an inherited field

10645. By Dario Bertini

Fixed a problem when the attrs passed to ModelBase.__new__ would contain a PropertyField before the field that it contains (thus subsequently failing when trying to access attributes that haven't been defined yet)

An alternative would be to reorder the attrs dict inside __new__, but this would mean to look for every item that's a PropertyField, and then see if the position of the wrapped field in attrs is problematic.
Another would be to modify add_to_class to call contribute_to_class for an "uninitialized" field, and then partially rollback some of the relationship that have been set up (or keep track inside the field of the fact that it has been already set up), but this would also have the problem of not having the actual name of the field available yet.

10644. By Dario Bertini

Added comments to add_property_field

10643. By Dario Bertini

With this change the PropertyFields will substitute the actual Fields in _meta
this is achieved by heavily reusing the usual contribute_to_class methods and by removing the other elements
also: this makes the m2m fields to behave exactly like the other fields (that is, to potentially be useful in the admin or some ModelForm)

10642. By Dario Bertini

Added a mostly working solution for bug #3148 and related tests

10641. By Dario Bertini

Reverted changes to reconcile with upstream and create a clean patch

10640. By Dario Bertini

Added a mostly working solution for bug #3148 and related tests

10639. By Dario Bertini

Temporarily removed tests for property Fields

10638. By Dario Bertini

merge heads

10637. By Dario Bertini

Applied django 3148 patch

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:~vcs-imports/django/trunk
This branch contains Public information 
Everyone can see this information.

Subscribers