diff options
| author | bwarsaw | 2007-05-28 20:21:41 +0000 |
|---|---|---|
| committer | bwarsaw | 2007-05-28 20:21:41 +0000 |
| commit | b18f632faa6de17badabb3c6c7ba61752ac84c37 (patch) | |
| tree | 8b444330b288c5dfc9b25be639d429abfaeb3d3d /Mailman/database/languages.py | |
| parent | 5ff792b13599920527b48f92f8bad880668f8f26 (diff) | |
| download | mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.tar.gz mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.tar.zst mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.zip | |
Diffstat (limited to 'Mailman/database/languages.py')
| -rw-r--r-- | Mailman/database/languages.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/Mailman/database/languages.py b/Mailman/database/languages.py deleted file mode 100644 index 6032a67df..000000000 --- a/Mailman/database/languages.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (C) 2007 by the Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -# USA. - -"""Available languages table.""" - -from sqlalchemy import * - - - -class Language(object): - def __init__(self, code): - self.code = code - - def __repr__(self): - return u'<Language "%s">' % self.code - - def __unicode__(self): - return self.code - - __str__ = __unicode__ - - - -def make_table(metadata, tables): - language_table = Table( - 'Language', metadata, - # Two letter language code - Column('language_id', Integer, primary_key=True), - Column('code', Unicode), - ) - # Associate List - available_languages_table = Table( - 'AvailableLanguage', metadata, - Column('list_id', Integer, ForeignKey('Listdata.list_id')), - Column('language_id', Integer, ForeignKey('Language.language_id')), - ) - mapper(Language, language_table) - tables.bind(language_table) - tables.bind(available_languages_table, 'available_languages') |
