Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 9595 invoked from network); 27 Feb 2010 19:57:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Feb 2010 19:57:09 -0000 Received: (qmail 25961 invoked by uid 500); 27 Feb 2010 19:57:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 25933 invoked by uid 500); 27 Feb 2010 19:57:08 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 25925 invoked by uid 99); 27 Feb 2010 19:57:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Feb 2010 19:57:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=SPF_SOFTFAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of cap@unagon.com does not designate 80.237.132.27 as permitted sender) Received: from [80.237.132.27] (HELO wp020.webpack.hosteurope.de) (80.237.132.27) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Feb 2010 19:57:00 +0000 Received: from p5dcfdb15.dip.t-dialin.net ([93.207.219.21] helo=[192.168.168.13]); authenticated by wp020.webpack.hosteurope.de running ExIM with esmtpsa (TLSv1:RC4-MD5:128) id 1NlSmD-0002lH-Kh; Sat, 27 Feb 2010 20:56:37 +0100 Message-ID: <4B8978F5.2070908@unagon.com> Date: Sat, 27 Feb 2010 20:56:37 +0100 From: Clemens Cap User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.8) Gecko/20100216 Lightning/1.0b1 Thunderbird/3.0.2 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Newbie problem with template path X-Enigmail-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;cap@unagon.com;1267300619;9c54afa1; 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