1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 16:09:44 +00:00

Add by-name view

This commit is contained in:
Emma 2019-06-28 08:48:56 -06:00
parent a6fba3d9ac
commit 44bdfc1413
2 changed files with 3 additions and 1 deletions

View file

@ -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)

View file

@ -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": {},