Better HN
topnewbestaskshowjobs
Log inSign up

aperezalbela

15 karma · joined Jul 17, 2014 (12y ago) · 13 submissions

Submissions

comment 1y ago · link · parent

"Trying something?"

comment 2y ago · link · parent

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 2y ago · link · parent

Passing username and password as HTTP Headers doesn't seem like a good idea

comment 2y ago · link · parent

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 2y ago · link · parent

You may. But you are not supposed.

comment 2y ago · link · parent

Hackers also use banks. Are them supposed to hack them as well?

comment 2y ago · link · parent

Not true. You must install from the AppStore and it charges you.

comment 2y ago · link · parent

So writing CSS overrides for every site I consume sounds healthy and fair to you?

comment 2y ago · link · parent

Like https://darkreader.org/ that costs?

comment 2y ago · link · parent

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.

11.

Please add a "dark" theme for Hacker News(news.ycombinator.com ↗)

49 points · by aperezalbela · 2y ago · 74 comments

12.

Using Git to manage vacations in a large distributed team(blog.scrapinghub.com ↗)

1 points · by aperezalbela · 11y ago · discuss