incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Barnes <>
Subject Re: Newbie problem with template path
Date Sun, 28 Feb 2010 02:28:36 GMT
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?


On 28/02/2010 6:57 AM, "Clemens Cap" <> 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,{})  ; }"



as expected. However


produces a


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...


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message