diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2017-02-25 23:24:30 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2017-02-25 23:24:30 +0100 |
commit | d3c667a654a27e8023c341fc3ec0e452599f0318 (patch) | |
tree | 56063a5438993a655409f2a0d7d2d8c5cbcc1ad8 /archivist/cli.py | |
parent | 2148929f3f4157a4bfda318c670290b4391a2739 (diff) | |
download | archivist-d3c667a654a27e8023c341fc3ec0e452599f0318.tar.gz archivist-d3c667a654a27e8023c341fc3ec0e452599f0318.tar.bz2 archivist-d3c667a654a27e8023c341fc3ec0e452599f0318.zip |
More prefix work
Diffstat (limited to '')
-rw-r--r-- | archivist/cli.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/archivist/cli.py b/archivist/cli.py index 4316705..f73a7a4 100644 --- a/archivist/cli.py +++ b/archivist/cli.py @@ -19,14 +19,11 @@ def db(): @db.command() def init(): """Initialize the database, if not done already.""" - from .model import create_tables, Prefix, db + from .model import create_tables, db + from .prefixes import register_prefixes create_tables() with db.atomic(): - Prefix.create(name='year', builtin=True) - Prefix.create(name='month', builtin=True) - Prefix.create(name='day', builtin=True) - Prefix.create(name='date', builtin=True, pseudo=True) - Prefix.create(name='direction', builtin=True, pseudo=True) + register_prefixes() @db.command() @click.confirmation_option(prompt="Are you sure you want to drop the database?") |