You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
375 B

from datetime import datetime
from django.db import models
from django_io.utils import generate_short_id
# Create your models here.
class Message(models.Model):
author = models.CharField(max_length=255)
message = models.TextField()
timestamp = models.DateTimeField(auto_now_add=True)
short_id = models.CharField(default=generate_short_id(), max_length=255)