Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # 1. MongoDB connection details
  2. MONGO_URI = 'mongodb://mongo:27017/evedemo'
  3.  
  4. # 2. Resource and items REST methods definition
  5. RESOURCE_METHODS = ['GET', 'POST', 'DELETE']
  6. ITEM_METHODS = ['GET', 'PATCH', 'DELETE']
  7.  
  8. # 3. Data schema
  9. people = {
  10. 'schema': {
  11. 'firstname': {
  12. 'type': 'string',
  13. 'minlength': 1,
  14. 'maxlength': 10,
  15. },
  16. 'lastname': {
  17. 'type': 'string',
  18. 'minlength': 1,
  19. 'maxlength': 15,
  20. 'required': True,
  21. 'unique': True,
  22. }
  23. }
  24. }
  25.  
  26. 4. Endpoints definition
  27. DOMAIN = {
  28. 'people': people
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement