From 94515a0cade0e6c0c1818b7440a0bbdbc650c515 Mon Sep 17 00:00:00 2001 From: David Fuentes Date: Mon, 7 Nov 2022 10:35:49 +0100 Subject: [PATCH] Add --nostatic and --insecure args to runserver command --- daphne/management/commands/runserver.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/daphne/management/commands/runserver.py b/daphne/management/commands/runserver.py index b2fd2ee..7e67e07 100644 --- a/daphne/management/commands/runserver.py +++ b/daphne/management/commands/runserver.py @@ -73,6 +73,18 @@ class Command(RunserverCommand): "seconds (default: 5)" ), ) + parser.add_argument( + "--nostatic", + action="store_false", + dest="use_static_handler", + help="Tells Django to NOT automatically serve static files at STATIC_URL.", + ) + parser.add_argument( + "--insecure", + action="store_true", + dest="insecure_serving", + help="Allows serving static files even if DEBUG is False.", + ) def handle(self, *args, **options): self.http_timeout = options.get("http_timeout", None)