Django Due control in Django

37 views
Skip to first unread message

Eugene TUYIZERE

unread,
Oct 1, 2020, 11:17:46 AM10/1/20
to Django users
Dear all,

I want to make an application that requires 2 person to complete the user creation. I mean when initiator creates  a user, for a user to login in application, it requires that an authorizer authorizes the user creation. This can also work in case a user is disable in the system. But I do not have an idea how to implement this in Django. If some can help I appreciate.

Thank you

Kunal Solanke

unread,
Oct 1, 2020, 12:16:39 PM10/1/20
to django...@googlegroups.com
You can add a field in custom user model or profile model if the user is authorized (boolean)or not ,and stop the navigation for user until this authorize field is set to true.

You can either create a decorator for that or just check in every view fn.


The authorize field can be changed from the admin panel thats your authorizer

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0c965c18-a0b4-48b0-9518-fcf9da63af0en%40googlegroups.com.

Mohammad Ahshan Danish

unread,
Oct 1, 2020, 1:20:52 PM10/1/20
to django...@googlegroups.com
Easy, 
while creating user make staff=false. 

Second user will go using the admin panel and can update isStaff= True. 

now the first user would be able to access the django app.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0c965c18-a0b4-48b0-9518-fcf9da63af0en%40googlegroups.com.


--
Thanks & Regards 
  
Regards, 
Danish

Eugene TUYIZERE

unread,
Oct 2, 2020, 11:28:18 AM10/2/20
to Django users
Thank you! I understand the ides a now

Dvs Khamele

unread,
Oct 11, 2020, 1:12:45 PM10/11/20
to django...@googlegroups.com
Hi do you hire contract based python/django freelancer?
 We can help you in this and related tasks at fair prices. Reply or send email to div...@pythonmate.com
Best Regards, 
Divyesh Khamele,
Pythonmate

--
Reply all
Reply to author
Forward
0 new messages