Ejemplo n.º 1
0
 def duration(self): 
     if self.ended == None:
         ts = self.started- self.started
         days = ts.days + 1
         return "%d days" % days
     else:
         print timesince(self.started, self.ended)
         days = ts.days + 1
         return "%d days" % days
Ejemplo n.º 2
0
 def __unicode__(self):
     return ' '.join([self.current_status,'('+timesince(self.timestamp)+' ago)'])
Ejemplo n.º 3
0
    def timesince(self, now=None):
	from django.utils import timesince
	return timesince(self.created, now)
Ejemplo n.º 4
0
 def __unicode__(self):
     return " ".join([self.current_status, "(" + timesince(self.timestamp) + " ago)"])
Ejemplo n.º 5
0
 def ago(self, obj):
     return timesince(obj.created_date)
Ejemplo n.º 6
0
 def get_age(self):
     return timesince(self.date_joined)
Ejemplo n.º 7
0
 def get_age(self):
     return timesince(self.date_joined)