# hebeicun_server **Repository Path**: shinerabbit/hebeicun_server ## Basic Information - **Project Name**: hebeicun_server - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-22 - **Last Updated**: 2024-04-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 环境准备 Python >= 3.8.0 (推荐3.8+版本) nodejs >= 14.0 (推荐最新) Mysql >= 5.7.0 (可选,默认数据库sqlite3,推荐8.0版本) Redis(可选,最新版) ## 项目运行 1. 进入项目目录 cd backend 2. 在项目根目录中,复制 ./conf/env.example.py 文件为一份新的到 ./conf 文件夹下,并重命名为 env.py 3. 在 env.py 中配置数据库信息 mysql数据库版本建议:8.0 mysql数据库字符集:utf8mb4 4. 安装依赖环境 pip install -r requirements.txt 5. 执行迁移命令: python manage.py makemigrations python manage.py migrate 6. 初始化数据 python manage.py init 7. 初始化省市县数据: python manage.py init_area 8. 数据库注释迁移 python manage.py migratecomment 9. 启动项目 python manage.py runserver 0.0.0.0:8000 或使用 daphne : daphne -b 0.0.0.0 -p 8000 application.asgi:application ## 定时任务 celery 定时任务相关命令 发布任务 celery -A celery_tasks.main beat 执行任务 celery -A celery_tasks.main worker -l info -P eventlet