Skip to content

Migrate PyMongo to Motor, model fixes and form creation route#13

Merged
jb3 merged 10 commits into
mainfrom
ks123/forms-routes
Dec 5, 2020
Merged

Migrate PyMongo to Motor, model fixes and form creation route#13
jb3 merged 10 commits into
mainfrom
ks123/forms-routes

Conversation

@ks129
Copy link
Copy Markdown
Contributor

@ks129 ks129 commented Dec 2, 2020

  • Migrated PyMongo to asynchronous Motor.
  • Made small fixes in models:
    • Removed circular import of Question
    • Use cls instead of self (Pydantic stuff)
    • Fix form features validation (plain __members__.values() don't work).
  • For listing views, move data to model before returning to:
    • catch broken data
    • return id instead _id
  • Locked all forms listing endpoint only to admins.
  • Created endpoint for creating new forms (/forms/new, POST).
  • Closes Add route for creating forms #6.

@ks129 ks129 added area: validation Code relating to validation of user input and Pydantic models. area: admin Code relating to admin functionality like creating and reading form responses. area: route Code that will create a new route on the web application. labels Dec 2, 2020
@ks129 ks129 requested a review from jb3 December 2, 2020 13:32
@ghost ghost added the needs 1 approval label Dec 2, 2020
@jb3 jb3 closed this Dec 5, 2020
@jb3 jb3 reopened this Dec 5, 2020
Copy link
Copy Markdown
Member

@jb3 jb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another fantastic PR, great work ks!

@ghost ghost removed the needs 1 approval label Dec 5, 2020
@jb3 jb3 merged commit e1a628b into main Dec 5, 2020
@jb3 jb3 deleted the ks123/forms-routes branch December 5, 2020 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: admin Code relating to admin functionality like creating and reading form responses. area: route Code that will create a new route on the web application. area: validation Code relating to validation of user input and Pydantic models.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add route for creating forms

2 participants