#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
0:02 we're going to implement the two-step
0:04 activation workflow which is more secure
0:07 because it sends an activation link to the user
0:10 to their email which they have
0:12 to click first before the account becomes active.
0:15 It's pretty easy to set up.
0:17 We basically have to add those two URL patterns
0:23 and not much more, the only thing where it got
0:26 complicated for me was the templating.
0:29 And, I'm going to show you that in the next video.
0:32 So, what you now want to do is head over
0:35 to general registration documentation
0:38 under the two-step activation workflow
0:41 and I'm just going to copy those two URL patterns.
0:46 And, I'm going to test it in my main mysite urls.py file.
0:52 So, back at the app.
0:55 The main app again is mysite and I have urls.py.
1:01 We have the root folder linking
1:05 to the URLs with the quotes app.
1:07 We have my backend which I renamed from the default app
1:10 into my-backend to make it a bit more hidden and secure.
1:16 So here I'm going to add those URLs.
1:19 I think URL is still the old format
1:22 so I'm going to rename URL to "path".
1:27 And, I don't think we need the leading card.
1:33 So, this should work, let's quickly verify that.
1:42 That's fine.
1:44 And now let's go to account/login, sorry, it's accounts.
2:00 And, I don't have a template and it's expecting
2:06 Let's try, register, and here it got
2:13 confusing for me because this template is expected
2:16 to be under django_registration.
2:20 So, the classic login, logout which comes
2:24 with django's authentication system expects
2:27 a template character name of registration.
2:30 And, the part of registration signing up
2:33 which is part of the django registration plugin.
2:36 It's not using the registration directory anymore
2:39 they renamed that to django_registration.
2:42 And I got a lot of struggle with this to get all those
2:44 "template does not exist" errors working
2:47 that's why I have all the templates prepared in a zipfile.
2:50 And, in the next video, I will show you
2:52 how to get it all in the right place.
2:54 And, really save some time and struggle.