Update post
This commit is contained in:
@@ -13,9 +13,6 @@ class Post(models.Model):
|
||||
status = models.IntegerField(choices=STATUS, default=0)
|
||||
created_on = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['-created_on']
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
@@ -25,8 +22,5 @@ class Comment(models.Model):
|
||||
post = models.ForeignKey(Post, on_delete= models.CASCADE)
|
||||
created_on = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['-created_on']
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
Reference in New Issue
Block a user