• arya-sites模块的主要类


     
    Site类,生成路由,
       - 方法:urlget_urls, register, login,logout
       - 字段:_registry = {}
       
    Config,基础配置类,主要用于处理请求 
       - self.model_class
       - self.request
       - self.site
       
       - urls()
       - get_urls()
       - extra_urls()
       
       - warpper()
       - add_view()
       - changelist_view()
       - delete_view()
       - change_view()
       
       
       - list_display 【字段,函数】
       - get_list_display()
       
       - actions      【函数】
       - get_actions()
       
       - show_add_btn
       - get_show_add_btn()
         
       - model_form_class
       - get_model_form_class()
       
       - list_filter 【字段,函数】
       - get_list_filter()
       

    ChangeList类,封装列表页面需要字段或功能
       - self.model_config
       - self.data_list
       
       - self.list_display = self.model_config.get_list_display()
       - self.show_add_btn = self.model_config.get_show_add_btn()
       - self.list_filter = self.model_config.get_list_filter()
       
       - self.request = model_config.request 
       - 分页
       
       - 创建添加按钮()
          ...
       - 创建组合搜索()
          for xxx
         
             yield RowItems(....)
       
    Option类,组合搜索配置
       - self.name_or_func
       - self.is_multi
       - self.val_func
       - self.text_func         
       
       
    RowItems类,生成筛选a标签
       - __iter__()
          yield ...
       
  • 相关阅读:
    第 6 章 存储
    第 6 章 存储
    第 6 章 存储
    第 6 章 存储
    第 6 章 存储
    vba:csv文件批量转换为xls的宏
    MySQL安装教程 推荐5.xx版本
    Cover Letter Draft for Application
    团队角色自测问卷答案
    联想Global future leader program面试
  • 原文地址:https://www.cnblogs.com/jec1999/p/7743837.html
Copyright © 2020-2023  润新知