Links are reworked to DB

This commit is contained in:
2022-07-12 16:56:01 +03:00
parent 02b1eb6003
commit ad87a47768
4 changed files with 19 additions and 8 deletions
+8 -1
View File
@@ -1,3 +1,10 @@
from django.db import models
# Create your models here.
class Link(models.Model):
order = models.SmallIntegerField('Order')
url = models.CharField('URL', max_length=250)
text = models.CharField('Text', max_length=250)
def __str__(self):
return f'({self.order}, {self.url}, {self.text})'