mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
hurp durp default language
This commit is contained in:
parent
905f5b3d13
commit
8e2ad429d9
2 changed files with 4 additions and 8 deletions
|
@ -48,10 +48,10 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''):
|
||||||
**all_session_args)
|
**all_session_args)
|
||||||
session = MultilangScopedSession(sm)
|
session = MultilangScopedSession(sm)
|
||||||
|
|
||||||
# Default to English. Warning, magic constant, blah blah. Trying to fetch
|
# Default to English. Warning, magic constant, messing with internals,
|
||||||
# English here would kinda break on new databases. TODO still not an ideal
|
# blah blah. Trying to fetch English here would kinda break on new
|
||||||
# solution, I guess.
|
# databases. TODO still not an ideal solution, I guess.
|
||||||
session._default_language_id = 9
|
session.registry()._default_language_id = 9
|
||||||
|
|
||||||
return session
|
return session
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,3 @@ class MultilangScopedSession(ScopedSession):
|
||||||
@default_language.setter
|
@default_language.setter
|
||||||
def default_language(self, new):
|
def default_language(self, new):
|
||||||
self.registry().default_language = new
|
self.registry().default_language = new
|
||||||
|
|
||||||
def remove(self):
|
|
||||||
del self.registry().default_language
|
|
||||||
super(MultilangScopedSession, self).remove()
|
|
||||||
|
|
Loading…
Reference in a new issue