class Meta: model = SqlAudit fields = ['db_id', 'content', 'remarks'] min_length = { 'db_id': 1, 'content': 1, 'remarks': 1, } max_length = { 'db_id': 1, #'content': 0, 'remarks': 255, } db_tag = Tools.get_db() tuple_db = (x for x in db_tag) widgets = { 'db_id': f.Select(choices=tuple_db, attrs={'class': 'form-control'}), 'content': f.Textarea(attrs={'class': 'form-control'}), 'remarks': f.Textarea(attrs={ 'class': 'form-control', 'rows': 5, 'required': True }), }
class GroupForm(f.Form): groupname = f.CharField(label=u'组名称', min_length=1, widget=f.TextInput(attrs={ 'class': 'form-control', 'style': 'width: 370px' })) groupbak = f.CharField( label=u'备注', required=False, min_length=0, widget=f.Textarea(attrs={ 'class': 'form-control', 'style': 'width:380px;height: 50px' })) menu = Tools.get_menus() tuple_menus = (x for x in menu) menus = f.MultipleChoiceField( widget=f.SelectMultiple(attrs={ 'id': 'menus-public-methods', 'multiple': 'multiple' }), choices=tuple_menus, label=u'用户清单') user = Tools.get_users() tuple_users = (x for x in user) users = f.MultipleChoiceField( widget=f.SelectMultiple(attrs={ 'id': 'users-public-methods', 'multiple': 'multiple' }), choices=tuple_users, label=u'用户清单')
def get_context_data(self, **kwargs): context = super(IdcCreateView, self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request, context=context) return ob
def get_context_data(self, **kwargs): con = super(UserListView,self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request,context=con) return ob
def get_context_data(self, **kwargs): con = super(BackupTasksUpdateView, self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request, context=con) return ob
def get_context_data(self, **kwargs): context = super(TotalConfigListView, self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request, context=context) return ob
def get_context_data(self, **kwargs): con = super(MysqlUpdateView, self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request, context=con) print(ob) return ob
def get_context_data(self, **kwargs): context = super(auditHistoryView, self).get_context_data(**kwargs) ob = Tools.get_content(request=self.request, context=context) return ob