>
> 2) I currently have information pulling from a collection of documents
> called a cartulary (long story on that project). So when I select from
> default/index the name
> of a collection I go from:
> http://127.0.0.1:8000/deeds/default/index
> to
> http://127.0.0.1:8000/deeds/default/cartulary/0001
>
> As expected, where 0001 is the identifier for the cartulary.
>
> Now, on that page is a list of documents. I would like to have the
> situation where if the user selects a document id, the system displays a
> page of the document at
> the URL:
> http://127.0.0.1:8000/deeds/default/cartulary/0001/document/1
>
> Where 1 is the id of the document in the collection. How is the best way
> to do this? Right now I have it directing to /default/documents/1 through
> the default controller and that is okay - but not quite what I want.
>
In the cartulary action, just include some logic to check request.args, and
return different content depending on the args:
def cartulary():
if request.args(1) == 'document':
doc_id = request.args(2)
[return document doc_id from cartulary request.args(0)]
else:
[return list of documents for cartulary request.args(0)]
3) I teach my students test driven development. Before I start diving into
> it myself - is there anything built into Web2Py that I've missed for doing
> test driven development or the related behaviour driven development?
>
In addition to what Massimo pointed out, have a look at
https://github.com/viniciusban/web2py.test and
https://github.com/niphlod/welcome_augmented.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.