安装

安装前先确保你已经安装了以下程序:

  • Python 3.5+ – 安装教程 https://www.ikaze.cn/article/28
  • pip 10+
  • git
    • libjpeg,zlib – pillow包的依赖
      • ubuntu: apt-get install libjpeg8-dev zlib1g-dev libfreetype6-dev
      • centos: yum -y install python-devel zlib-devel libjpeg-turbo-devel

另外安装之前建议配置虚拟环境

  1. pip3 install virtualenv
  2. virtualenv --no-site-packages deeru_env
  3. source deeru_env/bin/activate
  4. # in windows, run this:
  5. # deeru_env/Scripts/activate

使用pip安装

  1. pip install deeru
  2. deeru-admin install DeerU

从git仓库安装

  1. git clone -b dev https://github.com/gojuukaze/DeerU.git
  2. cd DeerU
  3. pip install -r requirements.txt

手动创建 deeru/urls_local.py 文件,内容如下:

  1. from django.contrib import admin
  2. from django.urls import path, include
  3.  
  4. urlpatterns = [
  5. path('admin/', admin.site.urls),
  6. path('', include('app.urls')),
  7. ]

手动创建 deeru/settings_local.py 文件,内容如下:

  1. DEBUG = True
  2.  
  3. ALLOWED_HOSTS = ['*']
  4.  
  5. CUSTOM_EXPRESSION = []
  6.  
  7. CUSTOM_APPS = [
  8.  
  9. ]