Note: This class uses drush, drush will be installed from git by init().
- List of possible PHP commands.
- Optional specify your own php.ini (see php bin option “-c”)
- drupal_path (mandatory)
- Path to drupal installation.
- drush_path (mandatory)
- Path where drush will be installed.
- Git branch to be downloaded for installation. Defauls to “6.x”, this drush version is compatible with Drupal 6.x and 7.x.
- Installs drush into drush_path() by downloading from github.
- Run any drush command.
- Shorthands for some drush commands.
- Enable/disable maintenance mode.
- Returns path or drush binary, may be used to run own scripts.
drush = Django(drupal_path="…", drush_path="…") drush.maintenance_enable() drush.cache_clear() drush.updatedb() drush.run("somecommand", "param1", "param2") drush.maintenance_disable()