Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.13 KB

setup.md

File metadata and controls

40 lines (32 loc) · 1.13 KB

simplepro 安装指南

simplepro 依赖 simpleui、django-export-import、以及django

  1. 安装simplepro
pip install simplepro
  1. INSTALL_APPS中配置

按以下顺序加入到INSTALL_APPS数组的顶部

INSTALLED_APPS = [
    'simplepro',
    'simpleui',
    'import_export',
    ......
]    
  1. 配置中间件
MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    # 加入simplepro的中间件
    'simplepro.middlewares.SimpleMiddleware'
]
  • 如果在开启DEBUG模式后,启动即可运行。
  • 如果关闭后,需要克隆静态文件,步骤与simpleui一致。文档地址