mirror of
https://github.com/django/daphne.git
synced 2025-07-13 17:32:17 +03:00
Remove --nostatic and --insecure args to runserver command if staticfiles app is not installed. (#559)
This commit is contained in:
parent
ce3e7f6156
commit
1502de002c
|
@ -73,18 +73,19 @@ class Command(RunserverCommand):
|
||||||
"seconds (default: 5)"
|
"seconds (default: 5)"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
if apps.is_installed("django.contrib.staticfiles"):
|
||||||
"--nostatic",
|
parser.add_argument(
|
||||||
action="store_false",
|
"--nostatic",
|
||||||
dest="use_static_handler",
|
action="store_false",
|
||||||
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
dest="use_static_handler",
|
||||||
)
|
help="Tells Django to NOT automatically serve static files at STATIC_URL.",
|
||||||
parser.add_argument(
|
)
|
||||||
"--insecure",
|
parser.add_argument(
|
||||||
action="store_true",
|
"--insecure",
|
||||||
dest="insecure_serving",
|
action="store_true",
|
||||||
help="Allows serving static files even if DEBUG is False.",
|
dest="insecure_serving",
|
||||||
)
|
help="Allows serving static files even if DEBUG is False.",
|
||||||
|
)
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
self.http_timeout = options.get("http_timeout", None)
|
self.http_timeout = options.get("http_timeout", None)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user