This repository has been archived on 2022-09-23. You can view files and clone it, but cannot push or open issues or pull requests.
webdev/website/blog/models.py

18 lines
465 B
Python
Raw Normal View History

2021-12-24 23:33:45 +01:00
from django.db import models
# move to `const.py`
STATUS = (
(0,"Draft"),
(1,"Publish")
)
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=200, unique=True)
2022-01-08 00:12:34 +01:00
# author = models.ForeignKey('user.auth',on_delete=models.CASCADE)
2021-12-24 23:33:45 +01:00
updated_on =models.DateTimeField(auto_now= True)
created_on = models.DateTimeField(auto_now_add=True)
content = models.TextField()
# status = models.IntegerChoices()