| 51 | |
| 52 | === Fill in required "new module" boilerplate === |
| 53 | Look at the lesson on "making a new module" in the Eden book:[[BR]] |
| 54 | http://booki.flossmanuals.net/sahana-eden/_draft/_v/1.0/building-a-new-application/ |
| 55 | |
| 56 | That puts the model file in the {{{eden/models}}} directory, but that is just to avoid complication. |
| 57 | Models in {{{eden/models}}} are loaded on every http request, whether they're needed or not. |
| 58 | Most Eden models are in {{{eden/modules/s3db}}}, and are only loaded by http requests that need them. |
| 59 | Since our message processing won't be used by most types of requests, we want it in {{{eden/modules/s3db}}}. |
| 60 | |
| 61 | Add the new module to the list of enabled modules. This is normally specified in a "template" that has the |
| 62 | customizations for a particular site. Here, we will "cheat" and just add the new module to our configuration |
| 63 | file {{{eden/models/000_config.py}}}. Get the default module list from |
| 64 | {{{eden/private/templates/default/config.py}}}, copy it to {{{models/000_config.py}}} and add an entry for |
| 65 | the hit module. |
| 66 | |