I was following the example here: https://github.com/pyeve/eve-demo/blob/master/settings.py
When I go to localhost:5000/apps, I can see all the documents in my collection, but when I search for an email at localhost:5000/apps/example@gmail.com, it says '404 not found'.
I've confirmed the regex, and the email addresses are in the documents. Can anyone see what might be wrong?
run.py
from eve import Eve
if __name__ == '__main__':
app = Eve()
app.run()
settings.py:
RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
ITEM_METHODS = ['GET', 'PATCH', 'PUT', 'DELETE']
MONGO_HOST = 'localhost'
MONGO_PORT = 27017
MONGO_DBNAME = 'test_database'
apps = {
'item_title' : 'app',
'additional_lookup' : {
'url' : 'regex("\b[\w.-]+?@\w+?\.\w+?\b")',
'field' : 'developer_email',
},
'schema': {
'address' : {
'type' : 'string'
},
'developer_email' : {
'type' : 'string',
'minlength' : 1,
'maxlength' : 15,
'required' : True,
'unique' : True,
}
}
DOMAIN = {
'apps' : apps,
}