Opened 15 years ago
Last modified 12 years ago
#137 reopened enhancement
Django's manage.py should mention ssh'ing to scripts on failure
Reported by: | geofft | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | autoinstallers | Keywords: | starter |
Cc: |
Description
If it's not too painful, it would be neat if we modified Django apps post-install such that ./manage.py would detect if it's running on scripts and, if not, ssh to scripts and re-execute itself there.
Change History (6)
comment:1 Changed 15 years ago by ezyang
comment:2 in reply to: ↑ description Changed 15 years ago by afarrell
Replying to geofft:
If it's not too painful, it would be neat if we modified Django apps post-install such that ./manage.py would detect if it's running on scripts and, if not, ssh to scripts and re-execute itself there.
However, what if I explicitly wish to run it locally? consider the following workflow: 1) I start a django project on scripts 2) I make a git repo out of it 3) I pull the repo locally 4) I go somewhere with a poor connection (or none at all) to 18net 5) I work on the site and wish to view it locally
Clearly in this case I do not expect it to have to ssh to scripts.
comment:3 Changed 15 years ago by geofft
Hm, good call. One way to address that might be to conditionalize this on (DATABASE_ENGINE == 'mysql' and DATABASE_HOST == 'sql.mit.edu'); I think you could argue that if you haven't overridden that, you want to be making changes to the database from a scripts.mit.edu server. If you're working on your app locally, you've probably pointed it to a local mysql server, or a SQLite file, or somesuch.
comment:4 Changed 12 years ago by geofft
- Resolution set to wontfix
- Status changed from new to closed
I'm no longer convinced this is a great idea (per Andrew's objection, and it's also very DWIM), so I'm withdrawing this request. If someone else thinks this is worth doing, feel free to reopen.
comment:5 Changed 12 years ago by adehnert
- Resolution wontfix deleted
- Status changed from closed to reopened
Does it make sense to wrap "from django.core.management import execute_manager" (or whatever it is now) in a try/except ImportError? block, and give a "Warning: try ssh'ing to scripts first" message when the import fails? (See also https://help.mit.edu/Ticket/Display.html?id=2381935.)
comment:6 Changed 12 years ago by adehnert
- Keywords starter added
- Summary changed from Django's manage.py should ssh to scripts if necessary to Django's manage.py should mention ssh'ing to scripts on failure
And also https://help.mit.edu/Ticket/Display.html?id=2429947...
If anybody objects to implementing comment 5 above, please say so. Otherwise, I'll do it / shove it at a prospective / etc..
Similar functionality would be useful for Wizard.