Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView

from colorama import just_fix_windows_console # https://github.com/tartley/colorama

from flask_autocrud import AutoCrud
from flask_sqlalchemy import SQLAlchemy

Expand All @@ -16,6 +18,7 @@ class CustomAdminView(ModelView):


def main():
just_fix_windows_console() # safe to call on non-windows - potentially a Flask bug?
app = Flask(__name__)
app.config['SECRET_KEY'] = 'more_difficult_string'
app.config['FLASK_ADMIN_SWATCH'] = 'cosmo'
Expand Down
2 changes: 2 additions & 0 deletions flask_autocrud/scripts/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys

import click
from colorama import just_fix_windows_console # https://github.com/tartley/colorama
import yaml
from flask import Flask
from flask_errors_handler import ErrorHandler
Expand Down Expand Up @@ -56,6 +57,7 @@ def main(database, config, log_config, bind, verbose, wsgi_server):
:param wsgi_server: wsgi server chose
:return: never returns
"""
just_fix_windows_console() # safe to call on non-windows
if config is not None:
try:
with open(config) as f:
Expand Down