1. We completed the REGISTER module previously. To make your Login link work, we need to update our URLS.PY
2. Create our LOGIN function in the VIEWS.PY
3. Create our LOGIN.HTML
4. Update our BASE.HTML
5. Update our VIEWS.PY
Run the code:
6. We should not show REGISTER button if we are logged in, so we update our BASE.HTML AS:
7. To make our logout button work, we update our VIEWS.PY AS:
8. Test our code:
9. To make see only the tools when they log in, we must update our HOME.HTML. We add the IF ELSE statement so that the tools would only appear if we log in otherwise we see the homepage with some information instead.
9. Load the page:
From here, you can login or register to see the Django tools.
We have made some custom CSS for our footer and home-info: We run COLLECTSTATIC to make sure that this external CSS is added to our root folder for deployment.
No PDF file attached.