Skip to content

Stop prompting to overwrite wsgi.py on redeploy - #25

Merged
copelco merged 2 commits into
caktus:mainfrom
tim-schilling:modify-wsgi
Aug 27, 2026
Merged

Stop prompting to overwrite wsgi.py on redeploy#25
copelco merged 2 commits into
caktus:mainfrom
tim-schilling:modify-wsgi

Conversation

@tim-schilling

Copy link
Copy Markdown
Contributor

wsgi.py always exists already, so use modify_file() rather than add_file(), which would prompt for overwrite confirmation on every redeploy and block --automate-all. Admittedly, I may not fully understand when we would want to prompt confirmation from the user and when we wouldn't. If I misunderstood the purpose here, let's close this.

This was generated with the help of Claude based on some friction points of attempting to deploy to PythonAnywhere repeatedly.

tim-schilling and others added 2 commits August 23, 2026 11:51
wsgi.py always exists already, so use modify_file() rather than
add_file(), which would prompt for overwrite confirmation on every
redeploy and block --automate-all.

@copelco copelco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think this makes sense. So for the re-deploy path, it's smooth and doesn't prompt to confirm updating wsgi.py each time, it just applies it:

  Modifying wsgi.py for PythonAnywhere...
  Modified file: /Users/copelco/projects/dsd-dev/dsd-dev-project_dtyid/blog/wsgi.py

If wsgi.py went missing, we stop and say so instead of guessing:

  Modifying wsgi.py for PythonAnywhere...
DSDCommandError: File /Users/copelco/projects/dsd-dev/dsd-dev-project_dtyid/blog/wsgi.py does not exist.

@copelco
copelco merged commit 75e607f into caktus:main Aug 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants