class Occurrence(models.Model):
'''
Represents the start end time for a specific occurrence of a master ``Event``
object.
'''
start_time = models.DateTimeField(_('start time'))
end_time = models.DateTimeField(_('end time'))
event = models.ForeignKey(Event, verbose_name=_('event'), editable=False)
notes = GenericRelation(Note, verbose_name=_('notes'))
objects = OccurrenceManager()
#===========================================================================
class Meta:
verbose_name = _('occurrence')
verbose_name_plural = _('occurrences')
ordering = ('start_time', 'end_time')
class SingleOccurrenceForm(forms.ModelForm):
'''
A simple form for adding and updating single Occurrence attributes
'''
start_time = forms.DateTimeField(widget=SplitDateTimeWidget)
end_time = forms.DateTimeField(widget=SplitDateTimeWidget)
# Translation works if these 2 lines get removed
#===========================================================================
class Meta:
model = Occurrence
if FIELDS_REQUIRED:
fields = "__all__"
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52a50110-4c9d-4f71-9ebf-6ade058fa47e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d350c903-7285-4932-8c9f-0c5c1a4407f4%40googlegroups.com.