-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b988787
commit 10f33d1
Showing
373 changed files
with
54,071 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git | ||
__pycache__ | ||
*.pyc | ||
*.pyo | ||
*.pyd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# True for development, False for production | ||
DEBUG=False | ||
|
||
# Flask ENV | ||
FLASK_APP=run.py | ||
FLASK_ENV=development | ||
|
||
# If not provided, a random one is generated | ||
# SECRET_KEY=<YOUR_SUPER_KEY_HERE> | ||
|
||
# Used for CDN (in production) | ||
# No Slash at the end | ||
ASSETS_ROOT=/static/assets | ||
|
||
# If DB credentials (if NOT provided, or wrong values SQLite is used) | ||
# DB_ENGINE=mysql | ||
# DB_HOST=localhost | ||
# DB_NAME=appseed_db | ||
# DB_USERNAME=appseed_db_usr | ||
# DB_PASS=pass | ||
# DB_PORT=3306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# tests and coverage | ||
*.pytest_cache | ||
.coverage | ||
|
||
# database & logs | ||
*.db | ||
*.sqlite3 | ||
*.log | ||
|
||
# venv | ||
env | ||
venv | ||
|
||
# other | ||
.DS_Store | ||
|
||
# sphinx docs | ||
_build | ||
_static | ||
_templates | ||
|
||
# javascript | ||
package-lock.json | ||
.vscode/symbols.json | ||
|
||
apps/static/assets/node_modules | ||
apps/static/assets/yarn.lock | ||
apps/static/assets/.temp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Change Log | ||
|
||
## [1.0.5] 2023-07-12 | ||
### Changes | ||
|
||
- Deployment-ready for Render (CI/CD) | ||
- `render.yaml` | ||
- `build.sh` | ||
- `DB Management` Improvement | ||
- `Silent fallback` to **SQLite** | ||
|
||
## [1.0.4] 2021-11-10 | ||
### Changes | ||
|
||
- Bump UI: Material Dashboard - v3.0.0 | ||
- Update Bootstrap to v5.1.3 | ||
- Update to Material Design 2 | ||
- Bump Codebase: [Flask Dashboard](/~https://github.com/app-generator/boilerplate-code-flask-dashboard) v2.0.0 | ||
- Dependencies update (all packages) | ||
- Flask==2.0.1 (latest stable version) | ||
- Better Code formatting | ||
- Improved Files organization | ||
- Optimize imports | ||
- Docker Scripts Update | ||
- Gulp Tooling (SASS Compilation) | ||
- Fixes: | ||
- Import error caused by WTForms | ||
|
||
## [1.0.3] 2021-05-16 | ||
### Changes | ||
|
||
- Bump Codebase: [Flask Dashboard](/~https://github.com/app-generator/boilerplate-code-flask-dashboard) v1.0.6 | ||
- Freeze used versions in `requirements.txt` | ||
- jinja2 = 2.11.3 | ||
|
||
## [1.0.2] 2021-05-11 | ||
### Improvements | ||
|
||
- Bump Codebase: [Flask Dashboard](/~https://github.com/app-generator/boilerplate-code-flask-dashboard) v1.0.5 | ||
- Freeze used versions in `requirements.txt` | ||
- flask_sqlalchemy = 2.4.4 | ||
- sqlalchemy = 1.3.23 | ||
|
||
## [1.0.1] 2021-02-10 | ||
### Improvements | ||
|
||
- Bump UI: [Jinja Material](/~https://github.com/app-generator/jinja-material-dashboard) v1.0.2 | ||
- Bump Codebase: [Flask Dashboard](/~https://github.com/app-generator/boilerplate-code-flask-dashboard) v1.0.4 | ||
|
||
## [1.0.0] 2020-07-30 | ||
### Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM python:3.9 | ||
|
||
# set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
COPY requirements.txt . | ||
|
||
# install python dependencies | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
# gunicorn | ||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" | ||
|
||
from flask import Flask | ||
from flask_login import LoginManager | ||
from flask_sqlalchemy import SQLAlchemy | ||
from importlib import import_module | ||
|
||
|
||
db = SQLAlchemy() | ||
login_manager = LoginManager() | ||
|
||
|
||
def register_extensions(app): | ||
db.init_app(app) | ||
login_manager.init_app(app) | ||
|
||
|
||
def register_blueprints(app): | ||
for module_name in ('authentication', 'home'): | ||
module = import_module('apps.{}.routes'.format(module_name)) | ||
app.register_blueprint(module.blueprint) | ||
|
||
|
||
def configure_database(app): | ||
|
||
@app.before_first_request | ||
def initialize_database(): | ||
try: | ||
db.create_all() | ||
except Exception as e: | ||
|
||
print('> Error: DBMS Exception: ' + str(e) ) | ||
|
||
# fallback to SQLite | ||
basedir = os.path.abspath(os.path.dirname(__file__)) | ||
app.config['SQLALCHEMY_DATABASE_URI'] = SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3') | ||
|
||
print('> Fallback to SQLite ') | ||
db.create_all() | ||
|
||
@app.teardown_request | ||
def shutdown_session(exception=None): | ||
db.session.remove() | ||
|
||
|
||
def create_app(config): | ||
app = Flask(__name__) | ||
app.config.from_object(config) | ||
register_extensions(app) | ||
register_blueprints(app) | ||
configure_database(app) | ||
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# -*- encoding: utf-8 -*- | ||
""" | ||
Copyright (c) 2019 - present AppSeed.us | ||
""" | ||
|
||
from flask import Blueprint | ||
|
||
blueprint = Blueprint( | ||
'authentication_blueprint', | ||
__name__, | ||
url_prefix='' | ||
) |
Oops, something went wrong.