Answer the question
In order to leave comments, you need to log in
How to do 2 factor registration?
I tried to install django-registration
and django-registration-redux
- nothing happened to me.
The User model is custom, I did not find any documentation with examples, django-registration
explanations django-registration-redux
.
In general, is there any difference between these packages?
Upset, thinking, maybe it’s worth writing it yourself (in fact, you just need to generate a key, save it, send the user an email with a link containing the key, activate the account when clicking on the link)?
Advise plz how to be: try to start django-registration
or write yourself.
Answer the question
In order to leave comments, you need to log in
There's writing for 5 minutes. You create a model with three fields: user (FK), some hash of something (yes, at least a random string), creation time (auto_now_add). When registering, you generate this model, and when you follow the link, you give the user is_active=True. You create a management command by running a cron once a day, which will clean up users (and this new model) who have not activated their account for, say, 3 days. Do not forget unique=True to hang up on the user and on hash.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question