HNHacker News
TopNewBestAskShowJobs

aperezalbela

15 karma · joined July 17, 2014

submissionscomments
aperezalbela··on How to Bypass WhatsApp Web's Locked Chat Feature
"Trying something?"
aperezalbela··on Cardie – An open source business card designer and sharing platform
I'd suggest using forms.Form for a LoginForm containing e.g.

username = forms.CharField(max_length=150) password = forms.CharField(widget=forms.PasswordInput)

and then a view to instantiate form with request.POST (if request.POST) like:

form = LoginForm(request.POST)

and then if form.is_valid() you can clean data using

username = form.cleaned_data['username']

and the same for password.

Then:

user = authenticate(request, username=username, password=password)

and then check if user is not None then login(request, user)

Note that login and authenticate come from django.contrib.auth import authenticate, login

Hope that helps.

aperezalbela··on Cardie – An open source business card designer and sharing platform
Passing username and password as HTTP Headers doesn't seem like a good idea
aperezalbela··on Please add a "dark" theme for Hacker News
I'm not comparing on those terms. I'm comparing about "being supposed" to do something. We may have the ability, but that doesn't mean that we will do everything we have the ability for.
aperezalbela··on Please add a "dark" theme for Hacker News
You may. But you are not supposed.
aperezalbela··on Please add a "dark" theme for Hacker News
Hackers also use banks. Are them supposed to hack them as well?
aperezalbela··on Please add a "dark" theme for Hacker News
Not true. You must install from the AppStore and it charges you.
aperezalbela··on Please add a "dark" theme for Hacker News
So writing CSS overrides for every site I consume sounds healthy and fair to you?
aperezalbela··on Please add a "dark" theme for Hacker News
Like https://darkreader.org/ that costs?
aperezalbela··on Please add a "dark" theme for Hacker News
It would be really appreciated for you guys to consider adding a dark theme for HackerNews.

The reasons, well, could be added as comments here in the thread. Though, as you may imagine, it's mostly because of my eyes when I visit you guys without daylight.