wuttaweb.views.upgrades
¶
Upgrade Views
- class wuttaweb.views.upgrades.UpgradeView(request, context=None)[source]¶
Master view for upgrades.
Default route prefix is
upgrades
.Notable URLs provided by this class:
/upgrades/
/upgrades/new
/upgrades/XXX
/upgrades/XXX/edit
/upgrades/XXX/delete
- delete_instance(upgrade)[source]¶
We override this method to delete any files associated with the upgrade, in addition to deleting the upgrade proper.
- execute_instance(upgrade, user, progress=None)[source]¶
This method runs the actual upgrade.
Default logic will get the script command from config, and run it via shell in a subprocess.
The
stdout
andstderr
streams are captured to separate log files which are then available to download.The upgrade itself is marked as “executed” with status of either
SUCCESS
orFAILURE
.