diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/management/commands/dummycmd.py | 30 | ||||
-rw-r--r-- | core/management/commands/reset_db.py | 32 |
2 files changed, 30 insertions, 32 deletions
diff --git a/core/management/commands/dummycmd.py b/core/management/commands/dummycmd.py new file mode 100644 index 0000000..0721ec6 --- /dev/null +++ b/core/management/commands/dummycmd.py @@ -0,0 +1,30 @@ +import os +from optparse import make_option + +from django.db import connection +from django.core import management +from django.core.management.base import BaseCommand, CommandError +from django.contrib.auth.models import User + +import settings + +"""this is now replaced by databaseRest.py +I don't know why this still exists. Needs testing to see if +removing it makes django misbehave. +""" + +class Command(BaseCommand): + def add_arguments(self, parser): + # Positional arguments + parser.add_argument('posargs', nargs='+', type=int) + + # Named (optional) arguments + parser.add_argument( + '--delete', + action='store_true', + help='Removed as redundant - use databaseReset.py', + ) + + def handle(self, *args, **options): + print(args) + print(options) diff --git a/core/management/commands/reset_db.py b/core/management/commands/reset_db.py deleted file mode 100644 index 83cc97b..0000000 --- a/core/management/commands/reset_db.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -from optparse import make_option - -from django.db import connection -from django.core import management -from django.core.urlresolvers import reverse -from django.core.management.base import BaseCommand, CommandError -from django.contrib.auth.models import User - -from troggle.core.models import Cave, Entrance - -import settings - -"""Pretty much all of this is now replaced by databaseRest.py -I don't know why this still exists. Needs testing to see if -removing it makes django misbehave. -""" - -class Command(BaseCommand): - help = 'Removed as redundant - use databaseReset.py' - - option_list = BaseCommand.option_list + ( - make_option('--reset', - action='store_true', - dest='reset', - default=False, - help='Removed as redundant'), - ) - - def handle(self, *args, **options): - print(args) - print(options) |