diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b79985a8..927419f8 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -194,7 +194,9 @@ def handle_js_runner(choice, use_docker, use_async): "gulp-uglify-es", ] if not use_docker: - dev_django_cmd = "uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver" + dev_django_cmd = ( + "uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver_plus" + ) scripts.update( { "dev": "concurrently npm:dev:*", diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml new file mode 100644 index 00000000..242f861a --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml @@ -0,0 +1,33 @@ + + + + + diff --git a/{{cookiecutter.project_slug}}/compose/local/django/start b/{{cookiecutter.project_slug}}/compose/local/django/start index 6415d7fb..ec57dc8e 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/start @@ -9,5 +9,5 @@ python manage.py migrate {%- if cookiecutter.use_async == 'y' %} exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' {%- else %} -exec python manage.py runserver 0.0.0.0:8000 +exec python manage.py runserver_plus 0.0.0.0:8000 {%- endif %}