Python Django soft ui dashboard 開發
🚀 Soft UI Dashboard Django 二次開發
本指南將指導你如何安裝、設定與客製化 Soft UI Dashboard Django。
📦 安裝模組
virtualenv env
source env/bin/activate
pip install -r requirements.txt
🛠 設定資料庫
python manage.py makemigrations
python manage.py migrate
🔑 建立超級使用者
python manage.py createsuperuser
此步驟將要求輸入帳號與密碼。
📂 程式架構
< PROJECT ROOT >
|
|-- core/ # 專案核心設定
| |-- settings.py # 設定檔
| |-- urls.py # 路由設定
|
|-- home/
| |-- views.py # APP 介面
| |-- urls.py # APP 路由
| |-- models.py # APP 資料庫模型
| |-- templates/ # 主題客製化
|
|-- requirements.txt # 依賴套件
|-- manage.py # 啟動應用程式
🎨 如何客製化
如需修改模板,可複製虛擬環境中的原始檔案到專案對應位置。例如:
Source PATH: /LIB/admin_soft/includes/footer.html
Destination PATH: home/templates/includes/footer.html
cd env/lib/python3.12/site-packages/admin_soft/templates/includes
複製foot.html到目錄cp footer.html /workspaces/soft-ui-dashboard-django/home/templates/includes/
修改foot.html
修改後顯示
☁️ 部署到 Render
- 前往 Render Blueprints
- 點選 New Blueprint Instance
- 連接要部署的 GitHub 倉庫
- 設定名稱並點擊 Update Existing Resources
部署完成後,專案將自動上線!
留言
發佈留言