Comply with MySQL CharField restriction of 255 chars

This commit is contained in:
Kumi 2020-01-17 16:24:53 +01:00
parent ce4c240043
commit 99f0ccaf72
1 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,8 @@ from django.db import models
# Create your models here.
class Setting(models.Model):
key = models.CharField(primary_key=True, max_length=512)
value = models.CharField(max_length=512)
key = models.CharField(primary_key=True, max_length=255)
value = models.CharField(max_length=255)
def __str__(self):
return self.key
return self.key