1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Merged regressiontests and modeltests into the test root.

This commit is contained in:
Florian Apolloner
2013-02-26 09:53:47 +01:00
parent b3d2ccb5bf
commit 89f40e3624
1050 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
help = "Dance around like a madman."
args = ''
requires_model_validation = True
option_list = BaseCommand.option_list + (
make_option("-s", "--style", default="Rock'n'Roll"),
make_option("-x", "--example")
)
def handle(self, *args, **options):
example = options["example"]
if example == "raise":
raise CommandError()
self.stdout.write("I don't feel like dancing %s." % options["style"])

View File

@@ -0,0 +1,10 @@
from django.core.management.base import BaseCommand
from django.utils import translation
class Command(BaseCommand):
can_import_settings = True
leave_locale_alone = False
def handle(self, *args, **options):
return translation.get_language()

View File

@@ -0,0 +1,10 @@
from django.core.management.base import BaseCommand
from django.utils import translation
class Command(BaseCommand):
can_import_settings = True
leave_locale_alone = True
def handle(self, *args, **options):
return translation.get_language()