Full Readme, .env_debug

This commit is contained in:
DarkCat09 2023-02-17 17:49:41 +04:00
parent abf60b3ac4
commit dcced28f84
5 changed files with 88 additions and 2 deletions

View file

@ -11,11 +11,13 @@ from dotenv import load_dotenv
from flask import Flask
from . import exts
from . import db
# Add your routes here
from .routes import Routes
from . import pages
from . import admin
from . import errors
from . import db
routes: List[Type[Routes]] = [
pages.RoutePages,
@ -37,7 +39,7 @@ def create_app() -> Flask:
# Load sample configuation
if app.debug:
load_dotenv(
Path(__file__).parent.parent / '.env'
Path(__file__).parent.parent / '.env_debug'
)
# Get the token from environment
# or generate it using secrets

View file

@ -9,7 +9,9 @@ from pymysql.cursors import Cursor
from . import exts
# SQL table name (used for the sample page)
TABLE = '${REPO_NAME_SNAKE}'
db_obj: List[Optional[Connection]] = [None]

View file

@ -4,4 +4,6 @@ from flaskext.mysql import MySQL # type: ignore
sql = MySQL(autocommit=True)
# Add your extensions here
exts = [sql]