# HG changeset patch # User Marcin Kuzminski # Date 1274911469 -7200 # Node ID c49ebe560af24ab3cc22cb6b46c68a0a8ab19143 # Parent 351013049742eda4d4ee7f016821a755717dfbfd fixed dbmanage script to work as standalone script diff -r 351013049742 -r c49ebe560af2 pylons_app/lib/db_manage.py --- a/pylons_app/lib/db_manage.py Wed May 26 23:55:48 2010 +0200 +++ b/pylons_app/lib/db_manage.py Thu May 27 00:04:29 2010 +0200 @@ -2,13 +2,17 @@ from os.path import dirname as dn from sqlalchemy.engine import create_engine import os +import sys +ROOT = dn(dn(dn(os.path.realpath(__file__)))) +sys.path.append(ROOT) + from pylons_app.model.db import Users from pylons_app.model.meta import Session from pylons_app.lib.auth import get_crypt_password from pylons_app.model import init_model -ROOT = dn(dn(dn(os.path.realpath(__file__)))) + logging.basicConfig(level=logging.DEBUG, format='%(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s') from pylons_app.model.meta import Base