Finally…Basic Login / Logout Functionality
After a day or so, I finally managed to get some basic Login/Logout functionality working on my Django project. What a pain in the butt, when you have no idea what you’re doing to begin with and you’re trying to do something without having to go back and do it later!
Several pages and much headaches later, I stumbled on one that made it pretty clear to me.
Since I am a fan of trying to lessen the trauma of people everywhere with similar issues as me, I will tell you that if you’re trying to make an authentication (basic one), go to this page. It’s part of the documentation on Django Project.
One mistake I made while trying to make the login() function work after my authentication was some KeyError…I think. No biggie. Just change the name of the view calling it. I had a wonderful stroke of mental prowess and thought…”Hey, why don’t I make this view login(), instead of something like login_page().” Well, I never claimed to be a rocket scientist. So just take my word for it if you’re a newbie and just make it something other than login().
If you guys want to see the result of the code itself, I s’pose I could paste it on here, but really the linked page in the above text was what I used. I haven’t deviated from it yet. Just visit the page and read it and hopefully it’ll help you if you’re having trouble with it.
Sadly, I’m not a python/django expert yet, so I can’t really help too much.
“The page I’m going on about.”
Have an awesome Easter weekend!
