This project replaces several related BooleanFields with a single field and a few eye candy features.
pip install django-bitoptions
from django.db import models
from bitoptions import BitOptions, BitOptionsField
TOPPINGS = BitOptions(
('pepperoni', 'mushrooms', 'onions', 'sausage', 'bacon',
'black olives', 'green olives', 'green peppers', 'pineapple',
'spinach', 'tomatoes', 'broccoli', 'jalapeno peppers', 'anchovies',
'chicken', 'beef', 'ham', 'salami')
)
CHEESES = BitOptions(('feta', 'parmesan', 'provolone', 'goat',
'mozzarella'))
class Pizza(models.Model):
toppings = BitOptionsField(options=TOPPINGS)
cheeses = BitOptionsField(options=CHEESES)