I thought the mixin idea was good but everyone else (including Aymeric) 
reviewed the pull request and ignored your comment about that so I assumed 
no one else saw its merits. Considering a CITextField that uses CharField 
still has some usefulness as you mentioned, I'm in favor of CITextField not 
inheriting anything and requiring its use as a mixin -- unless there are 
some unforeseen problems with that.

On Wednesday, February 8, 2017 at 11:55:50 AM UTC-5, Jon Dufresne wrote:
>
> > Does it make sense to add a CICharField for these cases or you can just 
> override the form/admin.
>
> In a past Django developers discussion, Aymeric suggested building this 
> functionality with a mixin so the citext type could apply to multiple DB 
> fields which would then affect how the form field is rendered. Personally, 
> I like this idea and believe it would provide the most flexibility such 
> that a TextField, CharField, EmailField, etc. could all be backed by the 
> citext type.
>
> https://groups.google.com/d/msg/django-developers/SW7_qI81G58/i6aJVRnJBAAJ
>
> From Aymeric in the previous thread:
>
> ---
> I'm forseeing a small difficulty in terms of API. This is a behavior I'd 
> like
> to "mix in" to some fields but I can't say if that will be easy to 
> implement.
>
> The general ideas would be:
>
> # A mixin
>
> class CITextField(TextField):
>     # ...
>
> # Case-insensitive versions of some built-in Django default fields
> # (if we consider that makes sense)
>
> class CIEmailField(CITextField, EmailField):
>     pass
>
> # The possibility for users to make custom fields case insensitive
>
> class CITagField(CITextField, TagField):
>     pass
> ---
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6f791f1c-ddaa-4c25-8fa7-730a70993a28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to