Пример #1
0
 def verbose_html(self):
     context = dict(status=self.status,
                    event=self,
                    module=self.module,
                    verbose_status=verbose_status(self.status),
                    verbose_time=pretty_date(self.down_at))
     return render_to_string('main/parts/last_incident.html', context) 
Пример #2
0
 def verbose(self):
     return "%(module)s (%(verbose_status)s) - %(verbose_time)s" % \
                 dict(module=self.module.name,
                      verbose_status=verbose_status(self.status),
                      verbose_time=pretty_date(self.down_at))
Пример #3
0
def pretty_date(date):
    return pretty_date(date)