From d8f9f95cb4f7a559a09da215ca9dcae0d133db96 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 21 Aug 2020 21:49:03 +1000 Subject: [PATCH] Add command to run the development server --- tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks.py b/tasks.py index 498b7fc758..bc3286db88 100644 --- a/tasks.py +++ b/tasks.py @@ -242,3 +242,13 @@ def backup(c): manage(c, 'dbbackup') manage(c, 'mediabackup') + +@task(help={'address': 'Server address:port'}) +def server(c, address="127.0.0.1:8000"): + """ + Launch a (deveopment) server using Django's in-built webserver. + + Note: This is *not* sufficient for a production installation. + """ + + manage(c, "runserver {address}".format(address=address))