mirror of
https://github.com/kennethreitz-archive/richtext.org.git
synced 2026-06-05 23:20:18 +00:00
12 lines
380 B
Python
12 lines
380 B
Python
import uuid
|
|
from django.db import models
|
|
|
|
# Create your models here.
|
|
class RichPost(models.Model):
|
|
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
|
text = models.TextField()
|
|
views = models.BigIntegerField()
|
|
published = models.DateTimeField('date published')
|
|
|
|
def __str__(self):
|
|
return "<RichPost id='{}'>".format(self.id) |