kohyunsil / Algo_camping

MIT License
2 stars 3 forks source link

[feature/server1] Blueprint Code Structure #48

Closed SeyoungKo closed 2 years ago

SeyoungKo commented 2 years ago

swagger UI 추가를 위한 blueprint 연동 작업

추가 사용 모듈

변경된 전체 코드 구조


├── app
│   ├── __init__.py
│   ├── config.py
│   ├── main
│   │   ├── __init__.py
│   │   ├── controller
│   │   │   ├── __init__.py
│   │   │   ├── detail.py
│   │   │   ├── search.py
│   │   │   └── user.py
│   │   ├── model
│   │   │   ├── __init__.py
│   │   │   ├── congestion_dao.py
│   │   │   ├── place_dao.py
│   │   │   ├── review_dao.py
│   │   │   ├── search_dao.py
│   │   │   └── user_dao.py
│   │   ├── service
│   │   │   ├── __init__.py
│   │   │   ├── detail.py
│   │   │   ├── search.py
│   │   │   ├── tag_points.py
│   │   │   └── user.py
│   │   └── util
│   │       ├── modeling_dto.py
│   │       ├── place_dto.py
│   │       └── user_dto.py
│   ├── static
│   │   ├── css
│   │   ├── font
│   │   ├── imgs
│   │   └── js
│   ├── templates
│   │   ├── layout
│   ├── test
│   │   ├── test_model.py
│   │   ├── test_service.py
│   │   └── test_view.py
│   └── view
│       ├── __init__.py
│       └── routes.py
├── app.py
├── data.ini
├── requirements.txt
└── run.sh
`
SeyoungKo commented 2 years ago

https://github.com/kohyunsil/Algo_camping/blob/626ea6fef226c2fcd14879d8a7337c5233ffdfd6/camping_server1/app.py#L1-L8 최상위 경로인 app.py에서 create_app()을 호출해 app 객체를 생성하고 blueprint 객체를 불러와 app 객체에 blueprint를 register한다.

SeyoungKo commented 2 years ago

https://github.com/kohyunsil/Algo_camping/blob/626ea6fef226c2fcd14879d8a7337c5233ffdfd6/camping_server1/app/__init__.py#L1-L17

SeyoungKo commented 2 years ago

https://github.com/kohyunsil/Algo_camping/blob/626ea6fef226c2fcd14879d8a7337c5233ffdfd6/camping_server1/app/main/__init__.py#L1-L24

SeyoungKo commented 2 years ago

https://github.com/kohyunsil/Algo_camping/blob/626ea6fef226c2fcd14879d8a7337c5233ffdfd6/camping_server1/app/main/model/__init__.py#L1-L19