Commit 5475922c authored by rubbersoulz's avatar rubbersoulz

Created Post model

parent 353ccb3b
from django.db import models from django.db import models
# Create your models here.
class Post(models.Model):
post_title = models.CharField(max_length=150)
post_body = models.TextField()
pub_date = models.DateField(auto_now=True)
def __str__(self):
return '"{}" published {}'.format(self.post_title, self.pub_date)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment