13 lines
370 B
Python
13 lines
370 B
Python
from django.db import models
|
|
from django.conf import settings
|
|
from django.contrib.auth.models import User
|
|
|
|
class Post(models.Model):
|
|
title = models.CharField(max_length=255)
|
|
content = models.TextField()
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
author_name = models.CharField(max_length=150)
|
|
|
|
def __str__(self):
|
|
return self.title
|