Received: by 10.101.65.9 with SMTP id s9mr4257867ank.15.1300913131110; Wed, 23 Mar 2011 13:45:31 -0700 (PDT) X-BeenThere: couchdb-python@googlegroups.com Received: by 10.100.30.35 with SMTP id d35ls9105and.6.p; Wed, 23 Mar 2011 13:45:30 -0700 (PDT) Received: by 10.101.75.4 with SMTP id c4mr4360966anl.20.1300913130505; Wed, 23 Mar 2011 13:45:30 -0700 (PDT) Received: by 10.101.75.4 with SMTP id c4mr4360965anl.20.1300913130485; Wed, 23 Mar 2011 13:45:30 -0700 (PDT) Return-Path: <36luKTQ4OAB46IO6B75-JSNBIHAIIAF86I78....@codesite.bounces.google.com> Received: from mail-yi0-f76.google.com (mail-yi0-f76.google.com [209.85.218.76]) by gmr-mx.google.com with ESMTPS id o38si1968561ani.9.2011.03.23.13.45.30 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2011 13:45:30 -0700 (PDT) Received-SPF: pass (google.com: domain of 36luKTQ4OAB46IO6B75-JSNBIHAIIAF86I78....@codesite.bounces.google.com designates 209.85.218.76 as permitted sender) client-ip=209.85.218.76; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 36luKTQ4OAB46IO6B75-JSNBIHAIIAF86I78....@codesite.bounces.google.com designates 209.85.218.76 as permitted sender) smtp.mail=36luKTQ4OAB46IO6B75-JSNBIHAIIAF86I78....@codesite.bounces.google.com Received: by yie21 with SMTP id 21so11815yie.3 for ; Wed, 23 Mar 2011 13:45:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.135.155 with SMTP id n27mr559383qat.20.1300913130270; Wed, 23 Mar 2011 13:45:30 -0700 (PDT) Reply-To: codesite-nore...@google.com X-Generated-By: Google Code X-GoogleCode-Project: couchdb-python X-GoogleCode-Issue-Id: 146 References: <11-12560507179679177234-16084185522831819867-couchdb-python=googlecode.com@googlecode.com> <0-12560507179679177234-16084185522831819867-couchdb-python=googlecode.com@googlecode.com> In-Reply-To: <11-12560507179679177234-16084185522831819867-couchdb-python=googlecode.com@googlecode.com> Message-ID: <12-12560507179679177234-16084185522831819867-couchdb-python=googlecode.com@googlecode.com> Date: Wed, 23 Mar 2011 20:45:30 +0000 Subject: Re: Issue 146 in couchdb-python: Up-to-dated view server From: couchdb-pyt...@googlecode.com To: couchdb-python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Comment #12 on issue 146 by kxepal: Up-to-dated view server http://code.google.com/p/couchdb-python/issues/detail?id=146 Several questions, could I? 1) what the reason of such wrapper against: def fun(doc): ... delta = (datetime.strptime(doc[...]) - datetime.strptime(doc[...])).days ... import datetime this is not very pythonic to place imports below, but datetime will be tried to import only once. However, this style could produce another problem: views must have not any state and any dependence from source which could be changed later. 2) Hoster could provide 3rd party modules, but it couldn't provide all versions of each template engine, for example. May be you needs trunk jinja2 with you own patches, who knows? So idea to create fully portable pythonic couchapp will be failed. 3) Is preprocessors statements really good idea? I saw them in couchapp, but they have been used only for declaration, not within document design nor view server. As intermediate result, this is implementation of require function as is it works for javascript view server: http://code.google.com/r/kxepal-couchdb-python-featured/source/detail?r=0b6625db473e74a83df7e9a339899a3c318f7b80 I still need to finish some details, so attachments with new version of view server will be later. Sorry, Dirkjan, it seems you to have revise it once again, but I'll include documentation for each vital function and more tests to make process more easy just(: