Home | Trees | Indices | Help |
---|
|
Macros used by loaders. compatible with couchapp. It allow you to include code, design docs members inside your views, shows and lists. for example to include a code, add just after first function the line : // !code relativepath/to/some/code.js To include a member of design doc and use it as a simple javascript object : // !json some.member.i.want.to.include All in one, example of a view : function(doc) { !code _attachments/js/md5.js if (doc.type == "user") { doc.gravatar = hex_md5(user.email); emit(doc.username, doc) } } This example includes md5.js code and uses md5 function to create gravatar hash in your views. So you could just store raw data in your docs and calculate hash when views are updated.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
logger = logging.getLogger(__name__)
|
|||
__package__ =
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri May 4 11:48:40 2012 | http://epydoc.sourceforge.net |