Hack Forums
[Python] Anybody here familiar with Django framework? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Anybody here familiar with Django framework? (/showthread.php?tid=5824226)



Anybody here familiar with Django framework? - Mate. - Apr 12, 2018

Hi, I creating a sign up/sign in page but having toruble deleting use info form the database if the user doesn't confirm the email address.

I want the process to go like this:

> User signs up
> If user confirms their email within 1 day, their account becomes active
If user doesn't confirm their email in the given time frame, then the temp info saved about their profile (username/email) is deleted from the email.


RE: Anybody here familiar with Django framework? - m0noxide - Apr 12, 2018

You're going to want to use a cron job or because you're using python, you can also use celery; there are background task libraries for Django I believe as well

Basically, in the cron job, you'd get the current time then compare against when created to see if it's been a day or not and then delete those accounts that are expired