#100DaysOfWeb in Python Transcripts
Chapter: Days 53-56: Django part 2 - registration and login
Lecture: Setting up urls.py for the two-step activation workflow
0:00 As I said in the introduction we're going to implement the two-step activation workflow which is more secure
0:08 because it sends an activation link to the user to their email which they have to click first before the account becomes active.
0:16 It's pretty easy to set up. We basically have to add those two URL patterns and not much more, the only thing where it got
0:27 complicated for me was the templating. And, I'm going to show you that in the next video. So, what you now want to do is head over
0:36 to general registration documentation under the two-step activation workflow and I'm just going to copy those two URL patterns.
0:47 And, I'm going to test it in my main mysite URLs.py file. So, back at the app. The main app again is mysite and I have URLs.py.
1:02 We have the root folder linking to the URLs with the quotes app. We have my backend which I renamed from the default app
1:11 into my-backend to make it a bit more hidden and secure. So here I'm going to add those URLs. I think URL is still the old format
1:23 so I'm going to rename URL to "path". And, I don't think we need the leading card. So, this should work, let's quickly verify that.
1:43 That's fine. And now let's go to account/login, sorry, it's accounts.
2:01 And, I don't have a template and it's expecting registration-login. Let's try, register, and here it got
2:14 confusing for me because this template is expected to be under django_registration. So, the classic login, logout which comes
2:25 with django's authentication system expects a template character name of registration. And, the part of registration signing up
2:34 which is part of the django registration plugin. It's not using the registration directory anymore they renamed that to django_registration.
2:43 And I got a lot of struggle with this to get all those "template does not exist" errors working
2:48 that's why I have all the templates prepared in a zipfile. And, in the next video, I will show you how to get it all in the right place.
2:55 And, really save some time and struggle.