Giter Club home page Giter Club logo

yoga-form's Introduction

Yoga-Form

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:

  1. 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:

userTable

batchTable

paymentTable

admissionTable

ER Diagram:

ER_Diagram

  1. Creating models:

Django models are created for the above mentioned tables and validation errors are raised.

  1. 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:

Screenshot from 2022-12-14 03-38-22

Screenshot from 2022-12-14 03-38-30

  1. API Testing with Postman

Screenshot from 2022-12-14 03-44-18

  1. Creating forms for frontend:

Screenshot from 2022-12-14 03-50-48

Screenshot from 2022-12-14 03-50-51

Form Validation

Screenshot from 2022-12-14 03-51-03

Screenshot from 2022-12-14 03-51-21

Screenshot from 2022-12-14 03-52-19

Screenshot from 2022-12-14 03-52-30

Screenshot from 2022-12-14 03-52-43

  1. 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:

Screenshot from 2022-12-14 04-02-42

Screenshot from 2022-12-14 04-01-44

  1. On clicking the link sent in mail:

HTTP Response 'Payment Successful' is generated.

Screenshot from 2022-12-14 04-12-35

  1. User Data is successfully stored in database:

userTableData

paymentTableData

batchTableData

admissionTableData

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

yoga-form's People

Contributors

zaverisanya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.