diff --git a/doc/howto/howto_website.rst b/doc/howto/howto_website.rst index 0ca53e49610..7eccd24935f 100644 --- a/doc/howto/howto_website.rst +++ b/doc/howto/howto_website.rst @@ -22,31 +22,15 @@ In OpenERP, doing things takes the form of creating modules, and these modules customize the behavior of the OpenERP installation. The first step is thus to create a module: -.. todo:: code generator in oe? +.. code:: shell-session - * Create empty module (mandatory name, category) - * Create controller (parent class?) - * Create model (concrete/abstract? Inherit?) - * Add field? + > oe scaffold Academy -* Create a new folder called :file:`academy` in a module directory, inside it - create an empty file called :file:`__openerp__.py` with the following - content: +.. patch:: + :hidden: - .. patch:: - -* Create a second file :file:`controllers.py`. This is where the code - interacting directly with your web browser will live. For starters, just - include the following in it: - - .. patch:: - -* Finally, create a third file :file:`__init__.py` containing just: - - .. patch:: - - This makes :file:`controllers.py` "visible" to openerp (by running the code - it holds). +This builds a basic module for you, ignore anything in the ``models`` and +``security`` directories for now. .. todo:: @@ -66,8 +50,8 @@ display). Let's prettify things a bit: instead of returning just a bit of text, we can return a page, and use a tool/library like bootstrap_ to get a nicer rendering than the default. -Change the string returned by the ``index`` method to get a more page-ish -output: +Go to :file:`academy/controllers/my_controller.py` and change the string +returned by the ``index`` method to get a more page-ish output: .. patch:: diff --git a/doc/howto/howto_website/basic-controller b/doc/howto/howto_website/basic-controller deleted file mode 100644 index 4415d9516bc..00000000000 --- a/doc/howto/howto_website/basic-controller +++ /dev/null @@ -1,15 +0,0 @@ -# HG changeset patch -# Parent 458a542843918f6899fe64bfe1cead00972ef68a - -diff --git a/controllers.py b/controllers.py -new file mode 100644 ---- /dev/null -+++ b/controllers.py -@@ -0,0 +1,7 @@ -+from openerp import http -+from openerp.addons.web.controllers import main -+ -+class Home(main.Home): -+ @http.route('/', auth='none') -+ def index(self): -+ return "Hello, world!" diff --git a/doc/howto/howto_website/basic-page b/doc/howto/howto_website/basic-page index 5a60c346acf..9e6c9d9abc7 100644 --- a/doc/howto/howto_website/basic-page +++ b/doc/howto/howto_website/basic-page @@ -1,11 +1,11 @@ # HG changeset patch -# Parent b377930cec8f9445882bb3268f9f5fac71dd8c15 +# Parent a76a9a0e0668f4191bdc383a0d4b3173f44b39b1 -diff --git a/controllers.py b/controllers.py ---- a/controllers.py -+++ b/controllers.py -@@ -4,4 +4,21 @@ from openerp.addons.web.controllers impo - class Home(main.Home): +diff --git a/controllers/my_controller.py b/controllers/my_controller.py +--- a/controllers/my_controller.py ++++ b/controllers/my_controller.py +@@ -6,4 +6,16 @@ from openerp.addons.web.controllers impo + class my_controller(main.Home): @http.route('/', auth='none') def index(self): - return "Hello, world!" @@ -18,12 +18,7 @@ diff --git a/controllers.py b/controllers.py +
+-+ This course will provide a basic introduction to a thing, for -+ motivated students with no prior experience in things. The course -+ will focus on the discovery of things and the planning and -+ organization necessary to handle things. -+
++Course introduction
+ +