There are two uses of crud. The typical use is this:
form=crud.create(db.table) form=crud.update(db.table,record_id) table=crud.select(db.table) form,table=crud.search(db.table) You can also do this def data(): return dict(form=crud()) This exposes everything and it intended mostly as an example. You should not really expose everything unless you do crud.settings.auth=auth which will require that you give explicit permissions to users to access 'read', 'update', 'create', 'delete' tables and records. On Jul 21, 8:19 am, Running Clam <[email protected]> wrote: > Hi Massimo, > > On 21/07/10 13:46, mdipierro wrote: > > > Crud does not determine in which controller it is called. You need to > > do > > > crud.settings.controller = 'MyController' > > > I may be able to change this behavior anyhow. > > Aha - I had not realised this. Links in the data returned by > "crud.tables()" are now formed as expected. > > However, if I follow a link to e.g.: - > > ../MyApp/MyCtl/tables/select/auth_user > > ...the page at that URL is identical to that returned by "crud.tables()" > - which makes sense insofar as it is calling the same function in the > same controller, but leaves me wondering how the "/select/auth_user" > part should work? The documentation lists the URLs exposed by CRUD, but > does not tell me what else I might need to do to use them. > > I could form CRUD links in the list of tables in the template, but I > can't see how to access the table name and href in the returned object, > possibly because I am not yet up to speed with HTML helpers. > > Am I missing something, or am I right in concluding that I should sort > out the links myself? > > Can you give me a pointer as to how to list the tablename and href "as is"? > > I'm sorry - I'm feeling rather dim about this... > > Thanks in anticipation! > > -- > > Clam

