began adding addpost function
This commit is contained in:
parent
81c455f014
commit
c50d047233
15 changed files with 106 additions and 21 deletions
|
|
@ -16,8 +16,13 @@ class Topic(models.Model):
|
|||
|
||||
|
||||
class Blogpost(models.Model):
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.title)
|
||||
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
last_modified = models.DateTimeField(auto_now=True)
|
||||
title = models.CharField(max_length=255)
|
||||
tags = models.ManyToManyField(Tag)
|
||||
topics = models.ForeignKey(Topic, blank=True, null=True, on_delete=models.CASCADE)
|
||||
topic = models.ForeignKey(Topic, blank=True, null=True, on_delete=models.CASCADE)
|
||||
mdfile = models.CharField(max_length=255)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue