lp:~berdario/django/propertyfields
- Get this branch:
- bzr branch lp:~berdario/django/propertyfields
Branch merges
Branch information
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. - 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)
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