Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ApplicationForm controller #19

Closed
avishkar58 opened this issue Jan 14, 2019 · 0 comments
Closed

Create ApplicationForm controller #19

avishkar58 opened this issue Jan 14, 2019 · 0 comments
Assignees
Labels
back-end Back-end work enhancement New feature or request

Comments

@avishkar58
Copy link
Contributor

avishkar58 commented Jan 14, 2019

Depends on #18

Create a back-end controller that can be used to GET an application form.
GET should be able to retrieve an application form for a given eventId

POST is optional for now because we could insert the data for the Indaba2019 form directly into the database in the interim.

Example of JSON response:

{
"eventId": 1,
"is_open": true,
"deadline": "2019-04-30",
sections: [
{
"sectionId": 1,
"name": "Section 1",
"description": "Section 1 description",
"order": 1
"questions": [
{"description": "Question 1", "type": "short-text", "required": true, "order": 1},
{"description": "Question 2", "type": "single-choice", "required": false, "order": 2},
]
},
{
"sectionId": 2,
"name": "Section 2",
"description": "This is section 2",
"order": 1
"questions": [
{"description": "What is 2+2?", "type": "short-text", "required": true, "order": 1},
{"description": "Upload your CV", "type": "file", "required": false, "order": 2},
]
},
]

}

Definition of Done
This task is done when:

  • There is an implementation of an applicationForm API in api/app/applicationForm/api.py that accepts a GET request
  • The API correctly retrieves the applicationForm (and associated section and question) models from the database
  • The API serializes the applicationForm and associated models and responds with JSON conforming to the above example
  • There are unit tests for the API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end Back-end work enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants