I am new in Odoo 8, i am trying to create website with dynamic table (Using ul and li),

i don't know how to retrive data from database,

Can anyone help me how to do this?

**init**.py :

```
import controller
import books

```

**opener**.py

```
{
'name': 'Book',
'version': '1.0',
'category': 'Tools',
'summary': 'Test Book',
'description': "",
'depends' : ['base'],
'data' : ['views/book.xml'],
'images': [],
'qweb':[],
'installable' : True,
'application': True,
}

```

controllerA.py :

```
import openerp.http as http
from openerp.http import request

class Book(http.Controller):
@http.route('/page/getjson/', auth='public')
def index(self, **kw):
   Books = http.request.env['x_book.book']
   return http.request.render('book.index', {
        'books': Books.search([])
   })

```

books.py (model) :

```
from openerp import models, fields

class books(models.Model):

_name = "x_book.book"

name = fields.Char(size=32, string="x_name")
desc = fields.Char(size=32, string="x_desc")

```

book.xml :

```
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="index">
    <title>Academy</title>
    <ul>
      <t t-foreach="books" t-as="book">
        <li><t t-esc="book.name"/></li>
      </t>
    </ul>
</template>
</data>
</openerp>

```

I am getting this error message when I hitting this url <http://localhost:8069/page/getjson>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.