On Thu, Oct 24, 2013 at 12:08 PM, schinckel <m...@schinckel.net> wrote:
> Hi, > > I was wondering if there was any reason why fields such as > models.DateField() do not use the SubFieldBase metaclass > trick to ensure they always contain instances of the correct > class? > > I'm referring to the description from > https://docs.djangoproject.com/en/dev/howto/custom-model-fields/#modelforms-and-custom-fields > > I had a look though the tickets, but was unable to find any discussion on > this. > > Is there a rationalé for not using this? > > Nothing specific that I'm aware of -- at a guess, I'd say it's an accident of history. DateField would have been one of the first fields written; generic tools for end-users to define their own field types would have come later. At that point, DateFields were a known entity with known behavior, so there wasn't any need to factor in the SubfieldBase functionality. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJxq848rerN71pcyk4yEkqeFO2zaAeVk8UfHZwpnz0zPw80HEg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.