diff --git a/README.md.tmpl b/README.md.tmpl index e87c78b..00aea86 100644 --- a/README.md.tmpl +++ b/README.md.tmpl @@ -27,7 +27,7 @@ This app uses [Alembic](http://alembic.readthedocs.org/en/latest/) to manage dat Use this command every time you or somebody in your team has updated the database schema: - $ python manage.py syncdb + $ alembig upgrade head https://sqlalchemy-searchable.readthedocs.org/en/latest/alembic_migrations.html @@ -46,16 +46,11 @@ If you add anything by hand remember to modify both the upgrade and downgrade me Do: - $ python manage.py syncdb + $ alembig upgrade head to run the generated migration on your local database. -### Manually Run the Migrations - - $ alembic upgrade head - - ### Reset Migrations To prune old migration files, simply delete the files. Then, in the earliest, still-remaining migration file, set down_revision to None: diff --git a/manage.py b/manage.py index abd1d5f..84594d3 100644 --- a/manage.py +++ b/manage.py @@ -2,38 +2,13 @@ from __future__ import print_function import io import os -from os.path import dirname, join -from alembic import command -from alembic.config import Config import baker from webapp.main import app from webapp.auth import manage -@baker.command -def syncdb(revision='head'): - """Run the database migrations - """ - print('\n-- Updating to the latest revision --') - alembic_cfg = Config(join(dirname(__file__), 'alembic.ini')) - command.upgrade(alembic_cfg, revision) - - print('\n-- Done. --\n') - - -@baker.command -def revertdb(revision): - """Revert the database to the given revision - """ - print('\n-- Downgrade --') - alembic_cfg = Config(join(dirname(__file__), 'alembic.ini')) - command.downgrade(alembic_cfg, revision) - - print('\n-- Done. --\n') - - @baker.command def run(host='0.0.0.0', port=None, **kwargs): """Runs the application on the local development server. diff --git a/webapp/config/common.py.tmpl b/webapp/config/common.py.tmpl index a9e2079..4b07ff7 100644 --- a/webapp/config/common.py.tmpl +++ b/webapp/config/common.py.tmpl @@ -109,3 +109,5 @@ LOGGING_CONFIG = { } MEMCHACHED_SERVERS = [] + +DEBUG_TB_INTERCEPT_REDIRECTS = False