diff --git a/realms/__init__.py b/realms/__init__.py index 7e706e7..fe70e7f 100644 --- a/realms/__init__.py +++ b/realms/__init__.py @@ -14,7 +14,7 @@ from werkzeug.routing import BaseConverter import config from session import RedisSessionInterface from wiki import Wiki -from util import to_canonical, remove_ext +from util import to_canonical, remove_ext, mkdir_safe class RegexConverter(BaseConverter): @@ -50,7 +50,8 @@ if not config.db['dbname'] in rdb.db_list().run(conn) and config.ENV is not 'PRO for tbl in ['sites', 'users', 'pages']: rdb.table_create(tbl).run(conn) -repo_dir = config.repo['dir'] +main_repo_dir = config.repos['main'] +repo_dir = config.repos['dir'] # This is down here because of dependencies above from models import Site, User, CurrentUser @@ -60,7 +61,7 @@ from models import Site, User, CurrentUser def load_user(user_id): return CurrentUser(user_id) -w = Wiki(repo_dir) +w = Wiki(main_repo_dir) def redirect_url(): diff --git a/srv/salt/realms/init.sls b/srv/salt/realms/init.sls index 99c1f6d..67ad1d1 100644 --- a/srv/salt/realms/init.sls +++ b/srv/salt/realms/init.sls @@ -5,11 +5,13 @@ python-pkgs: - python-pip - build-essential -{% for pkg in ['tornado', 'pyzmq', 'itsdangerous', 'boto', 'redis', 'simplejson', 'sockjs-tornado', 'flask', 'flask-bcrypt', 'flask-login', 'flask-assets', 'gittle', 'gevent', 'lxml', 'markdown2', 'recaptcha-client', 'RethinkORM' ] %} + +{% for pkg in ['tornado', 'pyzmq', 'itsdangerous', 'boto', 'redis', 'simplejson', 'sockjs-tornado', 'flask', 'flask-bcrypt', 'flask-login', 'flask-assets', 'gittle', 'gevent', 'lxml', 'markdown2', 'recaptcha-client', 'rethinkdb', 'RethinkORM' ] %} {{ pkg }}-pip: pip: - name: {{ pkg }} - installed - require: - pkg.installed: common-pkgs + - pkg.installed: rethinkdb {% endfor %} \ No newline at end of file