From ec961d53688717c0bac0041de58c332e1ce660ef Mon Sep 17 00:00:00 2001
From: Claudio Pisa <claudio.pisa@garr.it>
Date: Tue, 13 Aug 2019 11:29:56 +0200
Subject: [PATCH] fix missing Python imports

---
 create-and-deploy-charms.rst | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/create-and-deploy-charms.rst b/create-and-deploy-charms.rst
index 1b1258e..485aac8 100644
--- a/create-and-deploy-charms.rst
+++ b/create-and-deploy-charms.rst
@@ -182,6 +182,11 @@ Wordpress Charm Development Tutorial
 
         This function uses the ``@hook`` decorator, which associates the decorated function to a `Charm Lifecycle event <https://jaas.ai/docs/charm-hooks>`_.
 
+        Add also the missing imports:
+
+        .. code-block:: python
+
+            from charms.reactive import when, when_not, set_flag, hook
 
     2. Position yourself in the wordpress directory and from the command line execute these commands:
 
@@ -293,12 +298,23 @@ Configure the Wordpress application according to https://help.ubuntu.com/lts/ser
             status_set('active', 'Ready')
 
 
-    This function retrieves informations from the mysql unit regarding the account and database that was created when
+    This function retrieves information from the mysql unit regarding the account and database that was created when
     the *juju add-relation mysql wordpress* command was executed.
 
     Then, writes these information into the */etc/wordpress/config-default.php* file using the Jinja2 templating engine.
 
-5. Build and deploy the wordpress charm with the last modifications:
+5. Add the missing imports:
+
+    .. code-block:: python
+
+        from charms.reactive import when, when_not, set_flag, hook, when_all
+        from charmhelpers.core.hookenv import status_set, relation_get, log
+        from charmhelpers.core.host import write_file, service_restart
+        from charmhelpers.core.templating import render
+        import charms.apt
+        import subprocess
+
+6. Build and deploy the wordpress charm with the last modifications:
 
     .. code-block:: bash
 
-- 
GitLab