initial commit
This commit is contained in:
parent
9c0c8356c4
commit
96c33e0f5e
@ -1,52 +0,0 @@
|
||||
# Test App Perfect
|
||||
|
||||
A test application with perfect structure
|
||||
|
||||
## 功能特性
|
||||
|
||||
- 基于Jingrow框架的现代化应用
|
||||
- 支持云端和本地部署
|
||||
- 符合最佳实践和未来趋势
|
||||
|
||||
## 安装
|
||||
|
||||
### 本地开发
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 运行开发服务器
|
||||
python -m uvicorn main:app --port 8001
|
||||
```
|
||||
|
||||
### 云端部署
|
||||
|
||||
```bash
|
||||
# 安装到Jingrow Cloud
|
||||
bench --site your-site install-app test_app_perfect
|
||||
```
|
||||
|
||||
## PageTypes
|
||||
|
||||
*PageTypes will be created through Jingrow Cloud backend after app installation*
|
||||
|
||||
## 开发
|
||||
|
||||
### 添加新的PageType
|
||||
|
||||
1. 在 `test_app_perfect/test_app_perfect/pagetype/` 下创建新的PageType类
|
||||
2. 在 `api/` 下添加对应的API处理函数
|
||||
3. 在 `frontend/` 下添加前端组件
|
||||
|
||||
### API接口
|
||||
|
||||
- `/test_app_perfect/api/` - REST API接口
|
||||
|
||||
## 许可证
|
||||
|
||||
MIT License
|
||||
|
||||
## 联系方式
|
||||
|
||||
Test Publisher - test@example.com
|
||||
@ -1,15 +0,0 @@
|
||||
# Core dependencies
|
||||
fastapi>=0.104.0
|
||||
uvicorn>=0.24.0
|
||||
pydantic>=2.0.0
|
||||
python-multipart>=0.0.6
|
||||
|
||||
# Database
|
||||
sqlalchemy>=2.0.0
|
||||
alembic>=1.12.0
|
||||
|
||||
# Development
|
||||
pytest>=7.4.0
|
||||
pytest-asyncio>=0.21.0
|
||||
black>=23.0.0
|
||||
flake8>=6.0.0
|
||||
@ -1 +0,0 @@
|
||||
__version__ = "0.0.1"
|
||||
@ -1,11 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
import jingrow
|
||||
|
||||
def has_app_permission():
|
||||
"""检查应用权限"""
|
||||
return True
|
||||
|
||||
def has_permission(pagetype, name=None):
|
||||
"""检查页面类型权限"""
|
||||
return True
|
||||
@ -1,6 +0,0 @@
|
||||
app_name = "test_app_perfect"
|
||||
app_title = "Test App Perfect"
|
||||
app_publisher = "Test Publisher"
|
||||
app_description = "A test application with perfect structure"
|
||||
app_email = "test@example.com"
|
||||
app_license = "mit"
|
||||
@ -1 +0,0 @@
|
||||
Test App Perfect
|
||||
@ -1,6 +0,0 @@
|
||||
[pre_model_sync]
|
||||
# Patches added in this section will be executed before pagetypes are migrated
|
||||
# Read docs to understand patches: https://framework.jingrow.com/docs/v14/user/en/database-migrations
|
||||
|
||||
[post_model_sync]
|
||||
# Patches added in this section will be executed after pagetypes are migrated
|
||||
@ -1,15 +0,0 @@
|
||||
# coding: utf-8
|
||||
|
||||
import pytest
|
||||
|
||||
class TestTestAppPerfect:
|
||||
"""{app_title} 测试类"""
|
||||
|
||||
def test_app_creation(self):
|
||||
"""测试应用创建"""
|
||||
assert True
|
||||
|
||||
def test_pagetype_creation(self):
|
||||
"""测试PageType创建"""
|
||||
# 测试PageType是否正确创建
|
||||
pass
|
||||
Loading…
x
Reference in New Issue
Block a user