Logo
Explore Help
Sign In
mattintech/KCAPDemoServer
1
0
Fork 0
You've already forked KCAPDemoServer
Code Issues Packages Projects Releases Wiki Activity
Files
f97808c7b38cecbc5a50b18d34bae3ad42ac5bd2
KCAPDemoServer/src/app/blueprints/admin/__init__.py

6 lines
125 B
Python
Raw Normal View History

Refactor application to MVC architecture with Flask blueprints Major architectural refactoring to improve code organization, maintainability, and scalability: - Implement MVC pattern with clear separation of concerns - Organize code into blueprints for different functional areas (main, tenant, admin, api) - Create models layer to encapsulate all database operations - Create services layer for business logic (auth, product, barcode) - Implement application factory pattern for better testability - Add environment-based configuration management - Remove old monolithic app.py and consolidate routes New structure: - app/models/ - Database operations (Tenant, Product, ARField, Settings) - app/services/ - Business logic (Auth, Product, Barcode services) - app/blueprints/ - Controllers organized by function - app/config.py - Environment configurations - run.py - Application entry point All routes remain backward compatible. No changes to API or templates functionality.
2025-10-20 18:11:16 -04:00
from flask import Blueprint
admin_bp = Blueprint('admin', __name__, url_prefix='/<tenant:tenant_id>')
from . import routes
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 50ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API