![]() | | |- # CSS files, Javascripts files | | | |- templates/ # Templates used to render pages | | | |- includes/ # | | |- navigation.html # Top menu component | | |- sidebar.html # Sidebar component | | |- footer.html # App Footer | | |- scripts.html # Scripts common to all pages | | | |- layouts/ # Master pages | | |- base-fullscreen.html # Used by Authentication pages | | |- base.html # Used by common pages | | | |- accounts/ # Authentication pages | |- login.html # Login page | |- register.html # Registration page | |- requirements.txt # Development modules - SQLite storage |- requirements-mysql.txt # Production modules - Mysql DMBS |- requirements-pqsql.txt # Production modules - PostgreSql DMBS | |. | |- home/ # Home Blueprint - serve app pages (private area) | |- base/ # Base Blueprint - handles the authentication | |- static/ The Base blueprint handles the authentication (routes and forms) and assets management. Unlock the pages served by home blueprint for authenticated users.Call the app factory method create_app defined in app/ init.py.If env.DEBUG is set to False the specified DB driver is used (MySql, PostgreSQL).If env.DEBUG is set to True the SQLite storage is used.Initialize the app using the specified profile: Debug or Production.| |- app/ # Implements app logic | |- base/ # Base Blueprint - handles the authentication | |- home/ # Home Blueprint - serve UI Kit pages | | | _init_.py # Initialize the app | |- requirements.txt # Development modules - SQLite storage |- requirements-mysql.txt # Production modules - Mysql DMBS |- requirements-pqsql.txt # Production modules - PostgreSql DMBS | |. ![]() The project is coded using blueprints, app factory pattern, dual configuration profile (development and production) and an intuitive structure presented bellow: After authentication, the app will unlock the private pages. Note: To use the app, please access the registration page and create a new user. $ # -port=5000 - specify the app port (default 5000) $ # -host=0.0.0.0 - expose the app on all network interfaces (default 127.0.0.1) $ # Start the application (development mode) $ # (Powershell) $env:FLASK_ENV = "development" $ # (Unix/Mac) export FLASK_ENV=development $ (Powershell) $env:FLASK_APP = ".\run.py " $ # Set the FLASK_APP environment variable $ # pip install -r requirements-pgsql.txt $ # Virtualenv modules installation (Windows based systems) $ # Virtualenv modules installation (Unix based systems)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |