academicstoday-django icon indicating copy to clipboard operation
academicstoday-django copied to clipboard

How can I change the access Page

Open toppylawz opened this issue 4 years ago • 0 comments

I am actually working on a project based on this powerful LMS of yours. I want it to be a specific school-based which means that nobody can just signup or apply except the staffs and students of that school. This is how I plan to get this solution working, I created a file name choices.py, in this, I created three different tuples named whoisonline(this is the options field that the user will choose from and depending on this he's expected to be redirected accordingly), staffs and students are the store of the emails for the staffs and the students respectively

whoisonline =  (
    ('staff', ('Staff')),
    ('student', ('Student'))
)

and the other one that will have to check the emails of all the staffs and the students are written as follows:

staffs =  (
    ('email1', ('[email protected]')),
    ('email2', ('[email protected]'))
)
students=  (
    ('email3', ('[email protected]')),
    ('email4', ('[email protected]'))
)

so if the email is not part of the lists of emails in the choice.py, then the user will not be allowed to even signup, otherwise, he will be redirected to a page strictly for that group.

My question is, how can I use 'redirect' in this application since it seems that authentication doesn't require 'redirect' to give access to the dashboard.

I will greatly appreciate any guidance that can make me solve this.

toppylawz avatar May 09 '20 18:05 toppylawz