摘要: web程序模型表结构 from django.db import models from rbac.models import UserInfo as RbacUserInfo # Create your models here. class School(models.Model): """ 校区 阅读全文
posted @ 2022-02-27 20:20 simon_T 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 将stark组件中通用服务v1.py模块中按钮定制增加默认值 def get_list_display(self): """ 获取页面上应该显示的列,预留的自定义扩展,例如:以后根据用户的不同显示不同的列 :return: """ value = [] if self.list_display: v 阅读全文
posted @ 2022-02-27 18:40 simon_T 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 业务背景 项目开发概览 将rbac和stark组件放进项目中,并注册app 路由注册 crm_simon/urls.py """crm_simon URL Configuration The `urlpatterns` list routes URLs to views. For more info 阅读全文
posted @ 2022-02-27 16:21 simon_T 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 思路 通用服务v1.py模块新增搜索功能 from django.db.models import ForeignKey, ManyToManyField from stark.utils.pagination import Pagination class SearchGroupRow(objec 阅读全文
posted @ 2022-02-27 14:43 simon_T 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 思路 ###添加列 中间服务v1.py文件中StarkHandler类新增表头 def display_checkbox(self, obj=None, is_header=None): """ :param obj: :param is_header: :return: """ if is_hea 阅读全文
posted @ 2022-02-27 10:38 simon_T 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 思路 服务v1.py模块导入 from django.db.models import Q 新增函数筛选功能 search_list = [] def get_search_list(self): return self.search_list changelist_view函数新增筛选功能逻辑 s 阅读全文
posted @ 2022-02-27 09:11 simon_T 阅读(23) 评论(0) 推荐(0) 编辑