def __init__(self): ''' Constructor. ''' readme_file = File(BASE_DIR / 'README.md') stub_file = File(SRC_DIR / 'data/stubs/README.stub.md') super(self.__class__, self).__init__(readme_file, stub_file) # Setup translator Translator.locale = 'pt' Translator.load('databases')
def __init__(self): """ Constructor. """ readme_file = File(BASE_DIR / "README.md") stub_file = File(SRC_DIR / "data/stubs/README.stub.md") super(self.__class__, self).__init__(readme_file, stub_file) # Setup translator Translator.locale = "pt" Translator.load("databases")
def __init__(self, dataset, dataset_dir, locale): ''' Constructor. Arguments: dataset (places.databases.Database): The dataset instance dataset_dir (str): The dataset directory locale (str): The dataset localization ''' readme_file = File(dataset_dir / 'README.md') stub_file = File(SRC_DIR / 'data/stubs/BASE_README.stub.md') super(self.__class__, self).__init__(readme_file, stub_file) self._dataset = dataset self._dataset_dir = dataset_dir self._locale = locale # Setup translator Translator.locale = locale Translator.load('databases')
def __init__(self, dataset, dataset_dir, locale): """ Constructor. Arguments: dataset (places.databases.Database): The dataset instance dataset_dir (str): The dataset directory locale (str): The dataset localization """ readme_file = File(dataset_dir / "README.md") stub_file = File(SRC_DIR / "data/stubs/BASE_README.stub.md") super(self.__class__, self).__init__(readme_file, stub_file) self._dataset = dataset self._dataset_dir = dataset_dir self._locale = locale # Setup translator Translator.locale = locale Translator.load("databases")
from collections import OrderedDict # External dependencies from sqlalchemy.sql.schema import Column, ForeignKey, Table from sqlalchemy.types import BigInteger, Integer, SmallInteger, String # Package dependencies from places.core.i18n import _, Translator from places.core.types import Entity, LegacyEntity # Translator setup Translator.load(__package__) # Classes class State(Entity): ''' Entity for states. ''' __table__ = Table( _('states'), Entity.metadata, Column(_('id'), SmallInteger, nullable=False, primary_key=True),