Skip to content

Commit

Permalink
Move all command scripts in same folder
Browse files Browse the repository at this point in the history
  • Loading branch information
tino097 committed Sep 4, 2018
1 parent 04b3c0d commit 2fc91eb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions ckan/cli/__init__.py
Expand Up @@ -56,4 +56,5 @@ def _load_config(config=None):
log.debug(u"Using " + filename)
return appconfig(u'config:' + filename)


load_config = _load_config
8 changes: 4 additions & 4 deletions ckan/cli/cli.py
Expand Up @@ -3,14 +3,14 @@
import os

import click
from ckan.cli.server.server import run
from ckan.cli.database.db import db
from ckan.cli import db, server


@click.group()
@click.help_option(u'-h', u'--help')
def ckan(*args, **kwargs):
pass

ckan.add_command(run)
ckan.add_command(db)

ckan.add_command(server.run)
ckan.add_command(db.db)
Empty file removed ckan/cli/database/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions ckan/cli/database/db.py → ckan/cli/db.py
Expand Up @@ -32,11 +32,11 @@ def initdb(config):
print(e)
print(u'Initialising DB: SUCCESS')


prompt_msg =u'This will delete all of your data!\nDo you want to continue?'
@db.command(u'clean', short_help=u'Clean the database')
@click.help_option(u'-h', u'--help')
@click_config_option
@click.confirmation_option(prompt=u'This will delete all the data! Do you want to continue?')
@click.confirmation_option(prompt=prompt_msg)
def cleandb(config):
u'''Cleaning the database'''
conf = load_config(config)
Expand Down
File renamed without changes.
Empty file removed ckan/cli/server/__init__.py
Empty file.

0 comments on commit 2fc91eb

Please sign in to comment.