Fixed sorting for latest pastes
This commit is contained in:
parent
21aaad38cd
commit
4d80983eea
|
@ -66,7 +66,7 @@ class Geometry(models.Model):
|
|||
|
||||
@classmethod
|
||||
def get_latest(cls):
|
||||
return cls.objects.all().filter(public = True).order_by('date')[:10]
|
||||
return cls.objects.all().filter(public = True).order_by('-date')[:10]
|
||||
|
||||
def get_expiration_date(self):
|
||||
for expiration in [self.HOUR, self.DAY, self.WEEK, self.MONTH]:
|
||||
|
@ -166,5 +166,3 @@ class Geometry(models.Model):
|
|||
if self.polycount == 0:
|
||||
self._generate_meta_infos()
|
||||
return self.height
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue