Coder Social home page Coder Social logo

mun's Introduction

Workflow of then MUN project

Models Created

1.) User model which inherits from AbstractUSer model--->There is a role field which allows multiple types of users

2.) There is a country model which has name, id and flag

3.) Team model ==> leader has onetoone relation with User

4.) Deligate profile,Profile==> user ->OneToOne

In Chits

There is a Chit model for storing the chits.

Every chit has a status field 0->Disapproved 1->Checking 2->Approved 3->Ratified chit field stores the content of message chit_from,chit_to have Country as a foreign key there is another field i.e reply_to_chit which has onetoone relation with itself

Now come to Working of the project

There will be 3 different kind of index pages depending upon the user.

First of all There will be a home page of the site which will have a login form. That is described by the logon view. When user clicks Log In. A post request is sent. We will store the role of user in a variable Based on the role An index page will be shown to each user.

To each user chits will be displayed depending upon the status of the chits

Workflow of messaging:

When a user sends a message. We will send an ajax request to an end Point having current url. That will create a chit with status = 1. Since we will be fetching chits from database every minute. Chit will reach to moderator because status=1

Now moderator will click Approve or Disapprove.

If moderator approves the the we will update the chit status to 2. since ajax is sending request to server to fetch the chits. Now chit will be reached to judge and will be removed from admin.

Same process will be repeated for judge.

Now comes handling replies.

When a user will be replying we will update the chit by adding content to reply_to field. now. We will first check if there already has been a reply to chit whose status is 3.

of that is the case furthur reply is note allowed.

else we will update the chits status.

mun's People

Contributors

dushyant19 avatar kunalsolanke 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.