Users fill in request related information, with submit button clicked, the request will be stored as an item in the database, meanwhile, the information will be transformed in JSON format and post to Conquest "create_request" API. If the post is successful, requestID will be returned. The requestID and picture address will be transformed in JSON format and post to Conquest"add_document" API. After that a picture is linked to the request in success. The users can see the what did they input in the below "request information table".
Web app demo for create a request https://youtu.be/Y4eUWJ544Oo
Check the result from the mobile App https://youtu.be/9yKiXP4yq5w
- Python Django
- HTML, materialize CSS
- Conquest API https://conquestsolutions.github.io/swagger/?api-version=2.0.10#/DocumentService/AddDocument
- Under the path \conquest\conquestapp, open console, run " python manage.py runserver 8100" (Before this, you might need to pip install python and django)
- Open the "http://localhost:8100/" in the browser
Relevant Code:
Front end: https://github.com/nicholeemma/conquest/tree/master/conquestrequest/templates/index.html
Back end: view.py demonstrates how the data interact, post to API and show on the webpage
model.py data schema
form.py form validation
url.py directs which function corresponds to the page
Attention: The token can be out of date, you might need to update the token in view.py line 44
- Form validation (For now, I used a content length limit as one rule of form. In the future, the form can validate whether the picture link is accessible and workable)
- Picture upload(If the current web application can be deployed and accessed through a HTTPS link, I can upload the picture from desktop. The picture will be firstly stored in the database and can be accessed through HTTPS link, then I can use this link as "address" to attach a picture in a request. I have realized partial development.)
- UI
Jiayue(Nicole) Yang 6/11/2020
If you have any question, contact me through "hpyangjiayue@gmail.com"