Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
def exclude_tables_from_config(config_):
tables_ = config_.get("tables", None)
if tables_ is not None:
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py
:
def exclude_tables_from_config(config_):
tables_ = config_.get("tables", None)
if tables_ is not None:
Before we can setup PostGIS we need to have a local version of Postgresql installed and running. The most effecient way to do this is to download and install Postgres.app.
Once Postgres.app is installed in your computers /Applications
directory. Open the Terminal and enter the following two commands
psql -d DATABASE_NAME -f /Applications/Postgres.app/Contents/Versions/9.3/share/postgresql/contrib/postgis-2.1/postgis.sql
from flask import Flask | |
from flask_sslify import SSLify | |
""" | |
Option 1 : (pip install pyopenssl) | |
from OpenSSL import SSL | |
context = SSL.Context(SSL.SSLv23_METHOD) | |
context.use_privatekey_file('web.key') | |
context.use_certificate_file('web.crt') |
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
# http://bytefish.de/blog/first_steps_with_sqlalchemy/ | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import create_engine | |
from datetime import datetime, timedelta | |
from sqlalchemy import Table, Column, Integer, String, DateTime, ForeignKey | |
from sqlalchemy.orm import relationship, backref | |
from sqlalchemy.orm import sessionmaker | |
Base = declarative_base() |