Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/cli/admin.py
# Copyright (C) 2017-2019 The Software Heritage developers | # Copyright (C) 2017-2019 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import click | import click | ||||
from swh.deposit.config import setup_django_for | from swh.deposit.config import setup_django_for | ||||
from swh.deposit.cli import cli | from swh.deposit.cli import deposit | ||||
@cli.group('admin') | @deposit.group('admin') | ||||
@click.option('--config-file', '-C', default=None, | @click.option('--config-file', '-C', default=None, | ||||
type=click.Path(exists=True, dir_okay=False,), | type=click.Path(exists=True, dir_okay=False,), | ||||
help="Optional extra configuration file.") | help="Optional extra configuration file.") | ||||
@click.option('--platform', default='development', | @click.option('--platform', default='development', | ||||
type=click.Choice(['development', 'production']), | type=click.Choice(['development', 'production']), | ||||
help='development or production platform') | help='development or production platform') | ||||
@click.pass_context | @click.pass_context | ||||
def admin(ctx, config_file, platform): | def admin(ctx, config_file, platform): | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |