This file contains hidden or 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
from flask import Flask | |
from flask_admin import Admin | |
from flask_admin.contrib import sqla | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import Column, ForeignKey, Integer, String | |
from sqlalchemy.orm import relationship | |
# Create application | |
app = Flask(__name__) |
This file contains hidden or 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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
import flask_admin as admin | |
from flask_admin.contrib import sqla | |
# Create application | |
app = Flask(__name__) |
This file contains hidden or 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
brew uninstall postgresql | |
brew install postgresql-9.5 | |
brew link -f postgresql-9.5 | |
mv /usr/local/var/postgres /usr/local/var/postgres.old | |
initdb -D /usr/local/var/postgres | |
# restore old database? | |
# pg_upgrade -b /usr/local/Cellar/postgresql/9.0.4/bin -B /usr/local/Cellar/postgresql/9.1.2/bin -d /usr/local/var/postgres.old -D /usr/local/var/postgres | |
# start postgres |
This file contains hidden or 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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
import flask_admin as admin | |
from flask_admin.contrib import sqla | |
# Create application | |
app = Flask(__name__) |
This file contains hidden or 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
Traceback (most recent call last): | |
File "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/flask/app.py", line 1817, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/flask/app.py", line 1477, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/flask/app.py", line 1381, in handle_user_exception | |
reraise(exc_type, exc_value, tb) | |
File "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/flask/_compat.py", line 33, in reraise | |
raise value | |
File "/home/travis/virtualenv/python3.3.5/lib/python3.3/site-packages/flask/app.py", line 1475, in full_dispatch_request |
This file contains hidden or 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
Show hidden characters
{ | |
"pep8_max_line_length": 120, | |
"python_interpreter": "python3", | |
"display_signatures": false | |
} |
This file contains hidden or 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
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy.ext.hybrid import hybrid_property | |
import flask_admin as admin | |
from flask_admin.contrib import sqla | |
from flask_admin.contrib.sqla.filters import BaseSQLAFilter, FilterEqual | |
# Create application | |
app = Flask(__name__) |
This file contains hidden or 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
PID=$(docker run -d "$@") | |
docker wait $PID | |
docker rm $PID |
This file contains hidden or 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
from datetime import date, datetime, time | |
from flask import Flask, request, render_template | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.admin.contrib import sqla | |
from flask.ext.admin import expose, Admin, AdminIndexView | |
app = Flask(__name__) |
This file contains hidden or 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
from datetime import date, datetime, time | |
from flask import Flask, request | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.admin.contrib import sqla | |
from flask.ext.admin import expose, Admin | |
from flask.ext.babelex import Babel | |
from flask.ext.admin.menu import MenuLink |