From 1d9c3a0147d0645c8ba992cca937e83dcda3df69 Mon Sep 17 00:00:00 2001 From: Eevee Date: Tue, 5 Apr 2011 23:34:28 -0700 Subject: [PATCH 1/1] hurp durp default language --- pokedex/db/__init__.py | 8 ++++---- pokedex/db/multilang.py | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pokedex/db/__init__.py b/pokedex/db/__init__.py index ae06c1b..99988fb 100644 --- a/pokedex/db/__init__.py +++ b/pokedex/db/__init__.py @@ -48,10 +48,10 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''): **all_session_args) session = MultilangScopedSession(sm) - # Default to English. Warning, magic constant, blah blah. Trying to fetch - # English here would kinda break on new databases. TODO still not an ideal - # solution, I guess. - session._default_language_id = 9 + # Default to English. Warning, magic constant, messing with internals, + # blah blah. Trying to fetch English here would kinda break on new + # databases. TODO still not an ideal solution, I guess. + session.registry()._default_language_id = 9 return session diff --git a/pokedex/db/multilang.py b/pokedex/db/multilang.py index 3274f61..d58f6df 100644 --- a/pokedex/db/multilang.py +++ b/pokedex/db/multilang.py @@ -200,7 +200,3 @@ class MultilangScopedSession(ScopedSession): @default_language.setter def default_language(self, new): self.registry().default_language = new - - def remove(self): - del self.registry().default_language - super(MultilangScopedSession, self).remove() -- 2.7.4