On Jun 2, 2:00 am, HARRY POTTRER <cp368...@ohio.edu> wrote:
> I have a models that represents an event.
>
> I want it to have a field that represents the days of the week that
> the event occurs. This is easy if all you need to be able to do is be
> able to select one day, but if you want to select multiple, the right
> way seems to be to create a DayOfWeek object, create 7 instances in
> your db, the use ManyToMany relations. To me that just seems wrong.
> I'd rather store it as a string like "WFS" or "MWF". Is there an easy
> way to do this in django?

Ages ago I wrote a snippet with a model field and form field to deal
with this. It should still work. See:
http://djangosnippets.org/snippets/1200/
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to