> 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/CADhq2b5GvZMSq9rUiGOHawfbBBoP0rf1%3D74Zi-yzmxcnvxndxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to