To confirm... You *are* using couchapp to generate your design doc, keeping the view and show funcs in files, and the included files in the same couchapp area?
-Patrick On 28/02/2010 6:57 AM, "Clemens Cap" <[email protected]> wrote: I am having a problem to understand the path where the engine looks for the files included with the !json and !code macros. More exactly: I am having a { "_id": "_design/example", "_rev": "11-4ca79b908a6278eeb8d4d5e2e6488fb5", "views": { "foo": { "map": "function(doc){ emit(doc._id, doc._rev+'QQQ')}" } }, "shows": { "my": "function(req, doc) { // !json templates.edit return template(templates.edit,{}) ; }" } } and http://localhost:5984/mydatabase/_design/example/_view/foo as expected. However http://localhost:5984/mydatabase/_design/example/_show/my produces a {"error":"normal","reason":"{gen_server,call,\n [couch_query_servers,\n {ret_proc,{proc,<0.21518.0>,<<\"javascript\">>,\n {couch_os_process,prompt},\n {couch_os_process,set_timeout},\n {couch_os_process,stop}}}]}"} I am having a non-empty { "_id": "_design/template/_show/my", "_rev": "2-7051cbe5c8faecd085a3fa619e6e6337" } but this does not seem to help here. Moreover, where do I place the template content into this object ? I never got that part working so probably it is just a very stupid newbie error... Best Clemens
