This commit is contained in:
2026-03-14 12:32:15 +08:00
parent 3a804ac033
commit 1c4e845dae
492 changed files with 146765 additions and 0 deletions

62
init_backend.bat Normal file
View File

@@ -0,0 +1,62 @@
@echo off
chcp 65001 >nul
echo ================================
echo Hertz Django Project Initialization Script
echo ================================
echo Checking Python environment...
python --version
if %errorlevel% neq 0 (
echo Error: Python not detected, please install Python first!
pause
exit /b 1
)
echo Configuring pip global mirror...
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
echo Creating virtual environment...
python -m venv venv
if %errorlevel% neq 0 (
echo Error: Failed to create virtual environment!
pause
exit /b 1
)
echo Activating virtual environment...
call venv\Scripts\activate
if %errorlevel% neq 0 (
echo Error: Failed to activate virtual environment!
pause
exit /b 1
)
echo Upgrading pip...
python -m pip install --upgrade pip
if %errorlevel% neq 0 (
echo Error: Failed to upgrade pip!
pause
exit /b 1
)
echo Installing Python third-party dependencies...
pip install -r requirements.txt
if %errorlevel% neq 0 (
echo Error: Failed to install requirements.txt!
pause
exit /b 1
)
echo Installing Hertz official dependencies...
pip install -r hertz.txt -i https://hertz:hertz@hzpypi.hzsystems.cn/simple/
if %errorlevel% neq 0 (
echo Error: Failed to install hertz.txt! Please activate the machine code first.
pause
exit /b 1
)
echo ================================
echo Project initialization completed!
echo ================================
echo Please run start_project.bat to start the project
pause