njpma/app/text/models.py
2021-09-28 15:10:22 +02:00

33 lines
851 B
Python

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()