0.0.39 fix admin, change slider view
This commit is contained in:
@@ -8,12 +8,12 @@ from GeneralApp.admin import Admin_StackedInline_Block
|
||||
from SlidesApp.admin import Admin_StackedInline_Slide
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
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':
|
||||
field.widget = widgets.TextInput(attrs={'style': 'width: 30%; height: 20px;'})
|
||||
if db_field.name == 'description':
|
||||
field.widget = widgets.Textarea(attrs={'style': 'width: 30%; height: 100px;'})
|
||||
return field
|
||||
# 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':
|
||||
# field.widget = widgets.TextInput(attrs={'style': 'width: 30%; height: 20px;'})
|
||||
# if db_field.name == 'description':
|
||||
# field.widget = widgets.Textarea(attrs={'style': 'width: 30%; height: 100px;'})
|
||||
# return field
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class Admin_Section(SuperModelAdmin, Admin_Trans_BaseModelViewPage):
|
||||
'id',
|
||||
'name', 'url',
|
||||
# 'title',
|
||||
'order', 'modifiedDT', 'createDT'
|
||||
'order'
|
||||
]
|
||||
|
||||
prepopulated_fields = {"url": ("name_en",)}
|
||||
|
||||
Reference in New Issue
Block a user