Example #1
0
 def __unicode__(self):
     return u"%s | %s | %s | %s" % (
         self.name,
         self.group,
         dateformat(self.start_datetime, "l H:i"),
         dateformat(self.semester.start_date, "Y")
     )
Example #2
0
def date_format(value, date_format):
    if not value:
        return u''
    if date_format is None:
        date_format = settings.DATE_FORMAT
    try:
        return formats.date_format(value, date_format)
    except AttributeError:
        try:
            return dateformat(value, date_format)
        except AttributeError:
            return ''
Example #3
0
 def __unicode__(self):
     task = self.task_type.__unicode__()
     descr = self.description or self.task_type.description
     if descr:
         task = "%s: %s" % (task, descr)
     if self.start_time:
         task = "%s on %s from %s - %s" % (
                     task, 
                     dateformat(self.start_time, "D M jS"),
                     time_format(self.start_time, "g:i a"),
                     time_format(self.end_time, "g:i a"))
         
     return task
Example #4
0
 def __unicode__(self):
     return u"%s - %s" % (
         dateformat(self.start_date, settings.DATE_FORMAT),
         dateformat(self.end_date, settings.DATE_FORMAT)
     )
Example #5
0
 def __unicode__(self):
     return u"%s | %s | %s" % (
         self.subject.name,
         self.subject.group.name,
         dateformat(self.start_datetime, settings.DATETIME_FORMAT)
     )