My code:
models/db.py
....
dbmy = DAL('mysql://user:user@localhost/test',migrate_enabled=False)
dbmy.define_table('Firewall', Field('disabled','text'),
Field('src_port_first','integer'),
Field('src_port_last','integer'),
Field('port_first','integer'),
Field('port_last','integer'),
Field('type','text'),
Field('Src_op','text'),
Field('src_ipaddr_first','text'),
Field('src_ipaddr_last','text'),
Field('src_netmask','text'),
Field('Dst_op','text'),
Field('dst_ipaddr_first','text'),
Field('dst_ipaddr_last','text'),
Field('dst_netmask','text'),
Field('Action','text'))
dbmy.commit()
controllers/select.py:
# -*- coding: utf-8 -*-
from gluon.tools import Crud
crud=Crud(dbmy)
def search():
return dict(form=crud.search(dbmy.Firewall))
If I try to 127.0.0.1:8000/[app]/select/search/Firewall
URL, The page write this:
invalid view (select/search.html)