1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

I18n for the database schema

- Helper base class: Named
  Subclasses: OfficiallyNamed, UnofficiallyNamed
  for these, a 'name' column is created in the appropriate text table
  also, they get automatic __str__/__repr__/__unicode__
- Faux columns: ProseColumn, TextColumn
  these become columns in the appropriate text tables
  these text tables (*_text, *_prose) are auto-generated at the end
  the main table gets one property (singular name) that gets the English text
   and one (plural name) with dict of texts keyed by language
- Every named table gets 'identifier'
- Languages compare & hash equal to their identifiers
- Existing foreign-name tables replaced by the autogenerated ones
- order_by: names replaced by identifiers
- New function: all_tables(), yields all tables
- Markdown move properties removed for now
- Schema test suite
This commit is contained in:
Petr Viktorin 2011-03-12 17:59:01 +02:00 committed by Eevee
parent 59f1e835f4
commit d813e24b25
3 changed files with 469 additions and 265 deletions

View file

@ -8,7 +8,7 @@ setup(
'pokedex': ['data/csv/*.csv']
},
install_requires=[
'SQLAlchemy>=0.6',
'SQLAlchemy>=0.6.6',
'whoosh>=1.1.0',
'markdown',
'construct',