Recent submissions

Comment · 1 year ago
"Trying something?"
Comment · 2 years ago
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.

Comment · 2 years ago
Passing username and password as HTTP Headers doesn't seem like a good idea
Comment · 2 years ago
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.
Comment · 2 years ago
You may. But you are not supposed.
Comment · 2 years ago
Hackers also use banks. Are them supposed to hack them as well?
Comment · 2 years ago
Not true. You must install from the AppStore and it charges you.
Comment · 2 years ago
So writing CSS overrides for every site I consume sounds healthy and fair to you?
Comment · 2 years ago
Comment · 2 years ago
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.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton