1
0
Fork 0
mirror of https://github.com/shouptech/humulus.git synced 2026-02-03 17:19:42 +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: for k in data:
doc[k] = data[k] doc[k] = data[k]
doc['_rev'] = rev # Add the revision back doc['_rev'] = rev # Add the revision back
print(doc)
doc.save() doc.save()
else: else:
put_doc(data) put_doc(data)

View file

@ -4,6 +4,9 @@
"views": { "views": {
"by-date": { "by-date": {
"map": "function (doc) {\n if (doc.$type == \"recipe\" && doc.created && doc.name) {\n emit(doc.created, doc.name)\n }\n}" "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": {}, "lists": {},