Login with pre-set credentials.

25 views
Skip to first unread message

kimeualexis

unread,
Jun 12, 2018, 9:36:13 AM6/12/18
to Django users
Hello, guys!
Am working on a student's portal with users: Admin, Staff & Student. I want the admin to be able to register Students & Staff with a password. After being registered, the students will be able to login with the pre-set password and can later change it. How do I achieve this functionality....where the Admin registers a student and the student is able to login with the pre-set password? Kindly assist.

Regards!

Mike Dewhirst

unread,
Jun 13, 2018, 1:57:48 AM6/13/18
to Django users
Is there a reason you want the Admin to do all the work instead of
individual users? Is there a reason you want the password changed later?
If lazy or security-unconscious Staff/Students didn't change the
password, would you expire it? If not, what are the consequences?

Maybe a better approach could be Staff and Student self-registration
with password rules enforcing strong passwords*. To control access,
perhaps roles might be assigned after bona fides are established with
the Admin. That might distribute the workload more equitably. You might
need a CAPTCHA but they are not too difficult to implement.

If that sort of approach suits your requirements there are tutorials to
show the way. One which I know takes that approach is here ...

https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/

... and others may be found here ...

https://hackr.io/tutorials/learn-django

Cheers

Mike

* I have recently installed
https://github.com/ubernostrum/pwned-passwords-django in one of my
projects. It is very easy to use and works well. For example, I tested
it out by trying to change a password to pa55w0rd. It was immediately
rejected as a compromised password. Lovely! James Bennett deserves
applause for that.



>
> Regards!
> --
> 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
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/539e79df-ff06-40b0-93fc-2979a346eb47%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/539e79df-ff06-40b0-93fc-2979a346eb47%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

赖信桃

unread,
Jun 13, 2018, 7:16:11 AM6/13/18
to django...@googlegroups.com
I believe the default django admin and default user system can meet you need. Check the docs: https://docs.djangoproject.com/zh-hans/2.0/ref/contrib/admin/

kimeualexis <kimeu...@gmail.com>于2018年6月12日周二 下午9:36写道:
Hello, guys!
Am working on a student's portal with users: Admin, Staff & Student. I want the admin to be able to register Students & Staff with a password. After being registered, the students will be able to login with the pre-set password and can later change it. How do I achieve this functionality....where the Admin registers a student and the student is able to login with the pre-set password? Kindly assist.

Regards!

--
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 post to this group, send email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages