njpma/app/text/models.py

34 lines
851 B
Python
Raw Normal View History

2021-09-28 13:10:22 +00:00
import logging
from django.contrib.auth import get_user_model
from django.db import models
logger = logging.getLogger(__name__)
User = get_user_model()
class Page(models.Model):
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
slug = models.SlugField()
public = models.BooleanField(default=False)
data = models.JSONField(default=dict)
title = models.TextField()
teaser = models.TextField()
body = models.TextField()
class Essay(models.Model):
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
slug = models.SlugField()
public = models.BooleanField(default=False)
data = models.JSONField(default=dict)
title = models.TextField()
teaser = models.TextField()
body = models.TextField()