I often found this handy too. Here's my implementation on bitbucket[1].
There are tests[2] and documentation[3]. It's something I wanted propose to
Django core as well but never found time to do so. :)
In my implementation I chose to assign numeric values explicitly:
SetField(choices=((1,"pizza")
Agreed - if we were going to implement this, we'd use a bit string
implementation, not push it into a char field.
Yours,
Russ Magee %-)
On Sat, Nov 2, 2013 at 4:22 AM, Michael Manfre wrote:
> Storing bits as a string is not an efficient use of space and is slower to
> query. Any reason why you
Storing bits as a string is not an efficient use of space and is slower to
query. Any reason why you are not using the bit datatype with a length?
E.g. 'bit(%s)' % len(self.flags)
Regards,
Michael Manfre
On Fri, Nov 1, 2013 at 3:50 PM, Paul Kenjora wrote:
> Hi,
>
> I'd like to propose a new
Hi,
I'd like to propose a new field type I've used on several projects. Its
a list of boolean flags all in one field. It replaces the need for many
Boolean fields and has the same basic DB lookup capabilities. This is
fully Admin compatible and Database agnostic.
Here is the full code, I'm