Hi,

Is it possible to add a bitmask field to allow multiple choices for small 
set of options in lieu of ManyToManyField?

For some cases, ManyToManyField is overkill. e.g. Select several days of 
week to indicate open days for stores while 7 boolean fields are too 
frustrated.

Benefits to these cases:
- Simpler database structure as 2 tables less
- Better query performance (no joining tables).

Disqus opened source their implementation ( 
https://github.com/disqus/django-bitfield ), but it supports neither Python 
3 nor 1.7. I hope this field could get official supports.

Syntax draft:
https://github.com/chicheng/deps/blob/bitmaskfield/drafts/BitMaskField.md

Chi


-- 
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 [email protected].
To post to this group, send email to [email protected].
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/c1447699-8cce-40d4-afd5-f5ade2bc3bd9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to