Checking in with some actual results. At the moment, my repo [1] contains a bit of documentation (look at the model field reference and the model topic guide) and a basic implementation with some trivial tests.
Some remarks: * I ended up using namedtuple anyway, providing a fallback implementation for 2.5 taken from the Python docs, because after quite some time trying to figure out the best approach I concluded I would have to pretty much reimplement the same thing -- no need to reinvent the wheel. * In my RFC [2] I apparently forgot about some things, like the new ForeignKey option you'll notice in my docs patch. I'm not too happy about its name, suggestions are welcome. (-: * I'm not fully satisfied with the placement of the new section in the topic guide either -- it does reference relationships so it would be weird to place it directly after the AutoField section but it is more related to the AutoField section as far as the topic goes. Ah well, this is probably just a bikeshed anyway. (-; * The docs will definitely need at least one more section in the reference, a discussion on supported lookup filters; I intend to write that in the near future. What is possible with the implementation in its current state? Basically, it can only do three things: add itself to a model, compose a namedtuple with a value when retrieved and set the underlying fields when assigned. The next thing on the list: model validation, syncdb and database indexes. That's it for this week, suggestions, complaints, remarks and such are welcome. Michal [1] https://github.com/koniiiik/django [2] https://groups.google.com/d/topic/django-developers/rF79c8z65cQ/discussion
signature.asc
Description: Digital signature
