mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 15:09:42 +00:00
Add by-name view
This commit is contained in:
parent
a6fba3d9ac
commit
44bdfc1413
2 changed files with 3 additions and 1 deletions
|
|
@ -148,7 +148,6 @@ def put_designs():
|
|||
for k in data:
|
||||
doc[k] = data[k]
|
||||
doc['_rev'] = rev # Add the revision back
|
||||
print(doc)
|
||||
doc.save()
|
||||
else:
|
||||
put_doc(data)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
"views": {
|
||||
"by-date": {
|
||||
"map": "function (doc) {\n if (doc.$type == \"recipe\" && doc.created && doc.name) {\n emit(doc.created, doc.name)\n }\n}"
|
||||
},
|
||||
"by-name": {
|
||||
"map": "function (doc) {\n if (doc.$type == \"recipe\" && doc.name) {\n emit(doc.name, doc.name)\n }\n}"
|
||||
}
|
||||
},
|
||||
"lists": {},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue