My app is live here: https://zaverisanya.github.io/Yoga-Form (deployed late but I wanted to learn!)
-> Language and Framework: Python and Django
-> Database: pgAdmin 4
-> SQL: postgresql
-> Frontend Languages: HTML, CSS, Javascript
-> Deployment : Railway
Steps to build this Project:
- Designing Database and ER Diagram:
There are 4 tables: User, Batch, Payment, Admission. The basic information is saved in user table along with batch ids. 4 batches are given. Payment details are stored in Payment Table. If the payment is successful the admission of the user is confirmed and stored in the admission tables.
Tables are as follows:
ER Diagram:
- Creating models:
Django models are created for the above mentioned tables and validation errors are raised.
- Creating API:
FormSerializer is created with the required fields to fetch the complex data and convert to json format and finally rendered into the database in the original format. Views are used for processing the data. It defines the POST request.
Example of the Serializer and API:
- API Testing with Postman
- Creating forms for frontend:
Form Validation
- The idea here is to register the user and send the payment link in mail so that user can pay the amount within 30 days and also the admission is confirmed after the completion of payment.
Assumption: Here the complete payment is stubbed function and it is always set to true. Hence all the registered users are admitted. The user registering for next month is registered again for that month.
Email is sent to the user using Django send_mail and Sendgrid API:
- On clicking the link sent in mail:
HTTP Response 'Payment Successful' is generated.
- User Data is successfully stored in database:
Assumption:
The complete payment function is a stubbed function. Right now the complete payment is always true and all the users are admitted. Complete payment should keep the track of link sent in mail and only if the user pays the amount, the user's admission is confirmed else the user details should not be added to admission.
Have a look at the demonstration of the Project: https://drive.google.com/drive/folders/1Cj-d0DuSZa7FcayrDO30TYk5yg6oT-cL?usp=share_link