Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Commit

Permalink
Fixed bugs for the release
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyuki committed Nov 24, 2014
1 parent b45d756 commit 4333077
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ release:
python setup.py sdist upload

wheel_release:
python setup.py sdist bdist_wheel upload --universal
python setup.py sdist bdist_wheel upload

doc: clean
cd docs && make clean && make html
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from distutils.core import setup
try:
from setuptools import setup
except:
from distutils.core import setup

setup(
name = 'tori',
version = '3.0.0',
version = '3.0.1',
description = 'A collection of libraries, a micro web framework based on Tornado framework, and the ORM for MongoDB',
license = 'MIT',
author = 'Juti Noppornpitak',
Expand Down
15 changes: 8 additions & 7 deletions tori/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import sys

# Third-party libraries
from imagination.entity import Entity as ImaginationEntity
from imagination.entity import Entity as ImaginationEntity, CallbackProxy
from imagination.helper import retrieve_module_path
from imagination.loader import Loader as ImaginationLoader
from imagination.locator import Locator as ImaginationLocator
Expand Down Expand Up @@ -234,18 +234,19 @@ def _prepare_session_manager(self):
def _prepare_db_connections(self):
db_config = self._settings['db']
manager_config = db_config['managers']
db = AppServices.get('db')
em_factory = AppServices.get('db')

for alias in manager_config:
url = manager_config[alias]['url']

db.set(alias, url)
em_factory.set(alias, url)

if do_connect_on_startup:
def callback():
return db.get(alias)
def callback(em_factory, db_alias):
return em_factory.get(db_alias)

AppServices.set('db.{}'.format(alias), callback)
callback_proxy = CallbackProxy(callback, em_factory, alias)

AppServices.set('db.{}'.format(alias), callback_proxy)

def _load_inclusion(self, inclusion):
source_location = inclusion.attribute('src')
Expand Down

0 comments on commit 4333077

Please sign in to comment.