Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why doesn't add RunServerPlus options for reload in windows when using docker? #4970

Closed
quroom opened this issue Apr 5, 2024 · 3 comments · Fixed by #4971
Closed

Why doesn't add RunServerPlus options for reload in windows when using docker? #4970

quroom opened this issue Apr 5, 2024 · 3 comments · Fixed by #4971

Comments

@quroom
Copy link
Contributor

quroom commented Apr 5, 2024

Description

What are you proposing? How should it be implemented?

Add this code when window = y when generating project, for reloading django code in window.

end of base.py
# RunServerPlus
# ------------------------------------------------------------------------------
{% if cookiecutter.windows == 'y' %}
# After how many seconds auto-reload should scan for updates in poller-mode
RUNSERVERPLUS_POLLER_RELOADER_INTERVAL = 5

# Werkzeug reloader type [auto, watchdog, or stat]
RUNSERVERPLUS_POLLER_RELOADER_TYPE = 'stat'
{% endif %}

Rationale

Why should this feature be implemented?
In window with docker, somehow(might be filesytem problem) reload doens't work with default RELOADER_TYPE.
So we should add above code but when the first time using cookiecutter, all of users don't realize what happens like me.
So it should be set by default when windows option as y in generating project step.

@foarsitter
Copy link
Collaborator

This would definitely help, can you submit a PR?

@quroom
Copy link
Contributor Author

quroom commented Apr 5, 2024

This would definitely help, can you submit a PR?

Yeah. It is honor to me. I will make a pr soon. I hope you review my code. 😀

@quroom
Copy link
Contributor Author

quroom commented Apr 6, 2024

For someone who is facing same issude. I really recommend you guys using wsl2 ubuntu system in windows.
It makes better experience.
But I still leave this issue and PR for some other people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants