Widget(3)
-
Sencha 'xtype' 정의 및 호출
정의: widget.{이름}으로 정의Ext.define('{App}.view.menu.LeftMenu', { extend: 'Ext.tree.Panel', alias: 'widget.leftmenu',호출: leftmenu로 호출: /app/view/menu/LeftMenu.js를 찾음 { region: 'west', width: leftWidth, xtype: 'leftmenu', },만약 LeftMenu.js가 존재하지 않는 경우: /widget/leftmenu.js를 찾음
2024.08.31 -
Django Admin widget 셋팅 주의점
적용안됨 : field.widget.attrs['size'] = 5 적용됨 : field.widget = forms.TextInput(attrs={'size': 5}) def formfield_for_dbfield(self, db_field, **kwargs): field = super(ImageAdmin, self).formfield_for_dbfield(db_field, **kwargs) if db_field.name in ('lang') : field.widget = forms.TextInput(attrs={'size': 5}) #field.widget.attrs['size'] = 5 return field
2021.02.07 -
Djang Admin widget 셋팅
formfield_overrides = { models.CharField: {'widget': forms.TextInput(attrs={'size': 1})}, models.TextField: {'widget': forms.Textarea(attrs={'rows': 1,'cols': 15})}, models.BooleanField: {'widget': forms.CheckboxInput(attrs={'value': 12})}, } widget 종류 'Media', 'MediaDefiningClass', 'Widget', 'TextInput', 'NumberInput', 'EmailInput', 'URLInput', 'PasswordInput', 'HiddenInput', 'MultipleHiddenInp..
2021.02.04