0.0.21 how dev block

This commit is contained in:
SDE
2023-11-28 15:01:17 +03:00
parent 426c001dc9
commit 78181b075d
10 changed files with 89 additions and 18 deletions

View File

@@ -12,9 +12,9 @@ from django.forms import widgets
def sets_for_formfield_for_dbfield(field, db_field):
if db_field.name == 'url' or db_field.name == 'name' or db_field.name == 'title' or db_field.name == 'name_plural':
if db_field.name in ['url', 'name', 'title', 'name_plural']:
field.widget = widgets.TextInput(attrs={'style': 'width: 30%; height: 20px;'})
if db_field.name == 'description':
if db_field.name in ['description', 'text']:
field.widget = widgets.Textarea(attrs={'style': 'width: 30%; height: 100px;'})
return field