Skip to content

Instantly share code, notes, and snippets.

@jonataa
Last active January 12, 2016 21:24
Show Gist options
  • Select an option

  • Save jonataa/aa1268aea065052b7f5a to your computer and use it in GitHub Desktop.

Select an option

Save jonataa/aa1268aea065052b7f5a to your computer and use it in GitHub Desktop.
PUT method for unexisting document is not working on the Python-EVE
from eve import Eve
if __name__ == "__main__":
app = Eve()
app.run()
import os
MONGO_HOST = os.environ.get('HOST', '127.0.0.1')
MONGO_PORT = os.environ.get('PORT', 27017)
MONGO_USERNAME = os.environ.get('USERNAME', None)
MONGO_PASSWORD = os.environ.get('PASSWORD', None)
MONGO_DBNAME = os.environ.get('DBNAME', 'foo')
IF_MATCH = False
ITEM_METHODS = ['PUT']
UPSERT_ON_PUT = True
persons = {
'schema': {
'firstname': {
'type': 'string'
},
'lastname': {
'type': 'string'
}
}
}
DOMAIN = {
'persons': persons
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment