You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use that verbatim, I get three string flags that are read as ('awesome_flag', 'Awesome Flag!') rather than as Awesome Flag! with a value of awesome_flag (using the admin view).
Saving via the admin also fails, for lack of appropriate value.
The text was updated successfully, but these errors were encountered:
What version of django-bitfield do you have installed?
I ran into this too a month ago. The README on the github.com page was for the development version, but I had 1.6.4 installed, which doesn't have labels.
Looks like 1.7.0 is now on PyPi as of May 10th. Maybe time to do pip install --upgrade django-bitfield
@johnboiles
1.7 does seem to have labels, but I have to say they're less than intuitive to use unless I'm just missing something entirely. You can't, for example:
o = MyModel.objects.first()
for f in o.flags:
print f.label # or f.get_label()
I don't disagree with you. Between this and issues #35 & #28, I'm considering moving away from django-bitfield. Might not be worth dealing with the nuances of django-bitfield to save a few bytes.
I've attempted to get a set of flags that have labels associated with them, as per the README, but it doesn't seem to actually work.
If I use that verbatim, I get three string flags that are read as
('awesome_flag', 'Awesome Flag!')
rather than asAwesome Flag!
with a value ofawesome_flag
(using the admin view).Saving via the admin also fails, for lack of appropriate value.
The text was updated successfully, but these errors were encountered: