Exemplo n.º 1
0
    def __before__(self, action, **params):
        account_name = request.environ.get('REMOTE_USER', None)
        if account_name:
            c.account = model.Account.by_name(account_name)
        else:
            c.account = None

        i18n.handle_request(request, c)

        c._cache_disabled = False
        c._must_revalidate = False
        c.content_section = c.dataset = None

        c.detected_l10n_languages = i18n.get_language_pairs()
Exemplo n.º 2
0
    def __before__(self, action, **params):
        account_name = request.environ.get("REMOTE_USER", None)
        if account_name:
            c.account = model.Account.by_name(account_name)
        else:
            c.account = None

        i18n.handle_request(request, c)
        c.state = session.get("state", {})

        c.q = ""
        c.items_per_page = int(request.params.get("items_per_page", 20))
        c.datasets = model.Dataset.all_by_account(c.account)
        c.dataset = None

        c.detected_l10n_languages = i18n.get_language_pairs()
Exemplo n.º 3
0
    def __before__(self, action, **params):
        account_name = request.environ.get('REMOTE_USER', None)
        if account_name:
            c.account = model.Account.by_name(account_name)
        else:
            c.account = None

        i18n.handle_request(request, c)
        c.state = session.get('state', {})

        c.q = ''
        c.items_per_page = int(request.params.get('items_per_page', 20))
        c.datasets = model.Dataset.all_by_account(c.account)
        c.dataset = None
        self._detect_dataset_subdomain()

        for item in self.items:
            item.before(request, c)

        c.detected_l10n_languages = i18n.get_language_pairs()