Giter Club home page Giter Club logo

swd_django's People

Contributors

0xrampey avatar adi10197 avatar amodnija avatar aryanagarwal15 avatar aryanpingle avatar ashadhaz avatar aviral09 avatar dmak21 avatar garrysan avatar itsmekalpita avatar khizirsiddiqui avatar mehulmpt avatar mukkachaitanya avatar sarthakag avatar sebastinsanty avatar sharanry avatar soumikdhua avatar svineet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swd_django's Issues

Send mails asynchronously

Emails should be sent asynchronously, as connection to the SMTP server takes time, and can hence hang the window.

Make Profile Page (Mobile)

Profile Page to Made in React JS. It also needs to be connected to GraphQL.

Components - Aryan
GaphQL - Gaurav

Server Auto-Update

As discussed, we don't have access to SWD on our local networks. This calls for a need in having auto-updation of code on the server and restarting it, whenever there is a new commit in production branch. There are various ways to go about this:

  1. Using Webhooks: Using github webhooks, we can start a script on the server whenever there is a commit in the production branch. There is a bit of difficulty in implementing this, as webhooks require a public-facing domain. We can request CC to provide us a domain say swd1.bits-goa.ac.in(not sure how long the process for this will be). A workaround can be to use ngrok for creating a tunnel.

  2. Run a cron job, which checks every hour, whether there is a code update (using git fetch). But this will be a slow update.

  3. As @adiasg suggested, create a hashed url, which if hit runs a script to pull the code. This seems to be the best way to do as of now.

Please comment with your suggestions.

Auth redirects for loggedOut state

When the Profile option is clicked inside the sidebar while the user is logged out the user must be redirected to the login page but currently its going to a blank page.

Tools to import data

At present, master branch only has the facility to import Users and students. Design a script to import complete data.

Implement Store

Types of objects created:

  • Passes (Workshops, Department Dinner, BITSAA/TEDx Talks etc.)
  • Tshirts (Should be able to choose whether to put nick or not, enter sizes (or not), colors)
  • Newspaper Subscription (Can probably go in passes only)

Setup Mess option

User needs to know if mess option is open or closed, and possibly even the last date.
If open,
A simple submit operation.
mobile-view-expand

Change format of Bonafide Certificate

SWD has asked for a specific change, which I am not very sure of how exactly to implement:
Some of the words/phrases in the body of Bonafide has to be italic in order to highlight them.

I have two ideas of implementing this feature:

  1. Create our minor version of templating. Say my name, Sebastin has to be italicized, then using some string literals around it we can parse and get to know that this has to be italicized. Eg. ((( Sebastin ))) will make my name italicized by replacing ((( and ))) with <i> and </i> respectively.

  2. Use a Rich Text Editor like django-tinymce to put the body of the text.

The former idea is what I feel is best adapted to this situation. @sarthakag Any comments?

updateMessOption mutation might need some fixes

Currently, this mutation take Mess choice and Date as arguments. Date should not be taken for security reasons as the client-side clock can be easily fooled. Any particular user should only be able to provide mutations for the current month.
Also, the response payload comes with an ID on successful mutation. What is the significance of this?
Do we need to include an explicit 'success' boolean to make client-side processing easier?

Share data with developers

How should data be shared among the development team? At present, the user data is lying in the tooling scripts. DB is huge with 1000000 lines of records. Having all of them pushed/pulled from github obviously isn't feasible.

Also, we should probably discuss how to make the codebase open source. Having data is a compromise in that case.

[URGENT] Calculate Mess Rebate

Depending on the leaves a student has taken, the mess charges for those particular days shouldn't be deducted from the students. This is calculated every month after taking into account all the approved leaves the student has taken.

Files to be added to .gitignore

Some common Django operations lead to the generation of extraneous files. (perhaps metadata)
These files need to be added to .gitignore. For example,

  • tools/_pycache
  • main/migrations/pycache?

Create LDAP Auth Backend without db storage

It has been strictly advised to not store the passwords on the server, due to previous db compromises.

We need to design a Custom Auth Backend which will query LDAP everytime someone is trying to login.

Bonafide printing using HTML Page instead of easy_pdf

easy_pdf is very tedious to install on server. Moreover it is not very enthusiastically maintained, hence support/enhancements can cease in future. Also, there are no other libraries which are good for pdf creation.

Dashboard shows incorrect information for leave and bonafide

  1. Don't display leave and bonafide if nothing is applied earlier
  2. Only show if the application is within a month
  3. For leave, show until the date of departure (+7 days_
  4. For bonafide, add a new update timestamp, and show on dashboard only till 7 days from update time

Display errors on forms

At present, there is no information about the errors being passed to the frontend, as to what is wrong with the form entry.

Setup an Email sending module

There are some requirements to send emails like if the leave is approved. Also this is done on the warden side, to let them know that there is a leave waiting for approval.

DayPass and Leave application shouldn't be together

The initial page is good, where DayPass and Leave Applications list are shown together. But when clicking the specific student for say, Leave, it should only show Leave Dashboard and not the other one.

Clean up code

  1. Enforce PEP8 standards.
  2. Remove unused imports (included in PEP8)

ImageField in student profile

At present, there is no provision to upload images of students.
The image urls should be secure and visible to only logged in users.

messoption GraphQL query needs to be fixed

Currently, all the mess choices for a user are being stored. This causes a GraphQL error when we send the current messoption query for the logged-in user as more than one MessOptionType objects are being returned at once. The Graphene code for this query needs to be corrected in either of the two ways:

  • Fix the code to cope with more user data as this might be useful later on to provide mess statistics to users.
  • Keep only a single copy of the mess option (which is the current month's mess option) for each user.

Either way, inspiration can be taken from views.py.

Create a production ready (deployable on demand) code

Some settings are different in a localhost server and production code. These include but are not limited to:

  1. In production, SECRET_KEY (settings.py), DB credentials should be secretive. As this is an open source project, there should be ways, to hide it from the public.
  2. Also some configurations are different such as: ALLOWED_HOSTS, DB setup (local uses sqlite3, and production uses postgresql)

Some of these have already been implement in the production branch. But it is hardcoded. It should be implemented in such a way that pull the github code on production or locally should work seamlessly without any hassles (an initial setup of environment variables is okay)

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.