
Welcome.



A Mother Demo.

 0 - Building a Work Environment

The directory contains three files and is used to make a 
mother demo.
First of all, we need to forge a mother unit work: let's
create a directory named demo_dir:

$ cp ../mother demo_dir

Now, cp the three files inside:

$ cp sql_sample.sql examples.py sample.py demo_dir

Now, change dir:

$ cd demo_dir



 1 - Creating database

We need a database: create a new database, for example
using createuser and createdatabase:

$ createuser --help
$ createdatabase --help


 
 2 - Configuring The Work environment

We need to configure Mother to tell which database has to
be used. Edit conf.py and set the database variables, for
example using vim:

$ vim conf.py

Note that you can also configure the logging feature.



 3 - Initializing the Work Environemnt

Now, we need to initialize the Work Environment.
First of all, test the db connection:

$ ./dbmapper.py -t

Correct problems (if any). Now, we need to initialize
Mother (only once):

$ ./dbmapper.py -sr

It's all.



 4 - Enjoy

Take a look at examples.py. It imports sample.py, where
few classes are defined. Each class referes to a db_table.

Try to run it:

$ python examples.py

Hack examples.py contents and learn Mother Wisdom ;)
Launch python:

>>> import sample

and enjoy.
