incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@apache.org>
Subject Re: Template file names
Date Thu, 12 Aug 2010 17:05:32 GMT

On Aug 12, 2010, at 5:27 AM, David Goodenough wrote:

> My question was not so much about which template system to use
> as about whether the template system had any sensitivity to the
> file extension of the template files, in particular does it set the
> content-type from the extension.
> 

No, the templates are stored as part of the JSON document bodies, so there is no content type.
The `couchapp` script removes extensions when pushing. There are other design document management
tools which do not remove extensions. It's really up to you. I've chosen to remove extensions
because it makes it easier to address templates etc in JavaScript.

Chris

> David
> 
> On Wednesday 11 August 2010, Chris Anderson wrote:
>> CouchDB doesn't care which template system you use. There are lots of 
> them
>> implemented in JavaScript. You might also look at Mustache.js.
>> 
>> For the one you have now .erb might provide good highlighting too.
>> 
>> Typed on glass.
>> 
>> On Aug 11, 2010, at 2:21 AM, David Goodenough 
> <david.goodenough@linkchoose.co.uk> wrote:
>>> I want to be able to develop CouchDB apps using the Eclipse plugin 
> and
>>> I want to use templates.
>>> 
>>> Templates have <%...%> tags in them, and the Helios (Eclipse 3.6) 
> HTML
>>> validator objects, saying this is not valid HTML (which is true). 
>>> However if I called these file .jsp rather than .html it would be legal.
>>> 
>>> So my question is whether the template system cares about file 
> extensions
>>> and whether this has any effect on things like content types?
>>> 
>>> David
> 


Mime
View raw message