initial drf project setup

This commit is contained in:
2025-03-02 08:41:31 -05:00
parent 8b213c462c
commit f4b03ea7cc
18 changed files with 289 additions and 0 deletions

13
journal/models.py Normal file
View File

@@ -0,0 +1,13 @@
from django.db import models
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=255)
content = models.TextField()
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
def __str__(self):
return f"{self.title} ({self.content[0:255]}{"..." if len(self.content) > 255 else ""})"