django days-of-week representation in model -


i have "jobs server" model i'm building. want include field save days of week job run on. in ui, user able have series of check boxes(one each day) can select. best way represent "days-of-week" data in mode?

class job(models.model):     name = models.charfield(max_length=32, unique=true)     package = models.foreignkey(package)     binary = models.foreignkey(binary)     host = models.foreignkey(host)     colo = models.foreignkey(location)     group = models.foreignkey(group)     type = models.foreignkey(type)     start = models.timefield()     end = models.timefield()     days = ? 

if want checkbox each one, easiest thing create booleanfields each of them. if want store more complex value (eg. comma separated list or something), create own widget , play javascript, go route.


Comments

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - Binding attached property to IEnumerable -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -