On Sun, 2007-11-04 at 14:25 +1100, Malcolm Tredinnick wrote: [...] > What needs to be changed for field subclassing -- and I keep meaning to > finish this work, along with my 5 other highest priorities -- is that > for custom fields (only!) we install attributes as part of contribute to > class so that, via Python's descriptor protocol (__set__ and __get__) > conversion automatically happens.
This thread motivated me to finish this work. Update to r6652 and you'll have some documentation and a helper metaclass for the common case (if you need something more advanced, you can obviously do without the metaclass and code __set__ and __get__ directly, as Marty has done in his duration field). The documentation is also online at http://www.djangoproject.com/documentation/custom_model_fields/ and linked from the model API docs (although not yet on the front documentation page, since that is manually created). Report any bugs you find, but it's mostly a documentation change. There are still a couple of small things to add (like a custom SQL creation method similar to what the 'gis' branch needs) and a custom get_db_prep_select() method or something like that. That's tomorrow's job. I'm going to sleep now. Regards, Malcolm -- Always try to be modest and be proud of it! http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---