So I'm working on a calendar application, and trying to come up with
an efficient way to mark some event as repeating.

The trivial way to create the model would be something like:

REPEAT = (
    ('D', 'Daily'),
    ('W', 'Weekly'),
    ('M', 'Monthly'),
    ('Y', 'Yearly'),
)

class Event(models.Model):
    title = models.CharField(maxlength=32)
    date = models.DateField()
    repeat = models.CharField(maxlength=1, choices=REPEAT)



When I render a calendar, I render one month at a time. Any
suggestions on an efficient way to query the db for all the events in
a given month?

Maybe it would make more sense to skip the database all together, and
store things as iCal files, using one of the Python iCal libraries to
parse through?

Jay P.

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

Reply via email to