mirror of
https://github.com/tanrax/simple-HTML-over-the-Wire-social-network-with-Django-and-stimulus.git
synced 2026-08-14 17:53:15 +02:00
16 lines
358 B
Python
16 lines
358 B
Python
from django.db import models
|
|
|
|
|
|
class Message(models.Model):
|
|
|
|
author = models.CharField(max_length=100)
|
|
text = models.TextField(max_length=200)
|
|
created_at = models.DateTimeField(auto_now_add=True)
|
|
|
|
class Meta:
|
|
db_table = "messages"
|
|
verbose_name_plural = "Messages"
|
|
|
|
def __str__(self):
|
|
return self.text[:10] + "..."
|