Miserlou/Zappa

Feature Proposal: Django Management Commands on Deploy // More Event-Based Hooks

Open

#715 opened on Mar 11, 2017

View on GitHub
 (29 comments) (0 reactions) (0 assignees)Python (11,903 stars) (1,286 forks)batch import
enhancementhelp wanted

Description

I think I'm up for implementing this feature, but wanted to make sure you don't see a problem with it first:

I'd like to be able to run a Django Management command on deployments. I could do this with a "post" callback handler, but I'd have to write a good bit of custom Python code to facilitate it. What I'd like to be able to do is something in the settings like:

"deploy_management_commands": [
  "sqlmigrate",
  "loaddata my_fixtures"
],
"update_management_commands": [
  "sqlmigrate",
]

And have the "deploy_management_commands" run on deployment of the environment, and "update_management_commands" run on updates to the environment.

If this doesn't seem like a patch you'd be interested, I'll implement it as my own "post" callback.

Contributor guide