feat: add types for model fields

This commit is contained in:
relikd
2023-06-06 01:14:15 +02:00
parent 3756cad01f
commit 3761ffd6a9
10 changed files with 72 additions and 43 deletions

View File

@@ -6,7 +6,8 @@ from app.base.forms.fields import TextField
class Trait(models.Model):
key = models.CharField('UUID', primary_key=True, max_length=20)
label = models.CharField('Label', max_length=200)
description = TextField('Beschreibung', blank=True)
description: 'models.TextField[str]' = TextField(
'Beschreibung', blank=True)
class Meta:
verbose_name = 'Attribut'