M
M
Mikkkch2020-12-10 20:17:06
Django
Mikkkch, 2020-12-10 20:17:06

Removing inactive users?

Hello, I have implemented a user registration system through email verification. The mechanism is primitive. The user enters all the necessary data into the form, after which an email is sent to him in the save method asking for confirmation. Only after he follows the sent link will his is_active flag be set to True.

I want to delete users who have registered, but for some reason did not confirm registration (laziness, or someone else's email was entered) once in a while. Why are there dead accounts in the database? Moreover, in the case when the deletion is carried out, the user who is about to register is not deleted (it will be inconvenient if at the moment when he went to the mail to confirm the registration he will be deleted and you will have to do everything again)

Please advise me implementation. Is it possible to fasten the selery so that all this is done in the background? In addition, I have long wanted the sending of the message itself to be asynchronous. This all takes a very long time due to the generation of the message itself and the user is waiting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-12-10
@Mikkkch

Enough to remove the crown. To send emails, you can use something lighter than Celery, or uwsgi spool if you use this app server.
Threat And so stop asking such things already, here they wrote many times what to use, and even through Google, you can find a lot of things.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question