Re: 2020 Authentication Initiativ

2019-04-10 Thread Barnaby
If we go to the most common use case, email + password is the current 
"default" of the web, rather than username + password. It would make sense 
for Django to use email + password by default.

It also feels like first_name and last_name have no place in AbstractUser 
and should me moved to NamedAbstractUser or something.

So we'd remove username, first_name and last_name by default.

Regarding other means of authentication, I don't know if Django should 
support any out-of-the-box. Magic Links could be a decent default but they 
do raise security issues and require email setup.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2ec07906-8a2a-4b63-a850-99e8fef95b5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Allowing model field choices to receive a list of strings instead of a list of string tuples

2019-04-19 Thread Barnaby
Hello,

I remember that, as a beginner Django developer, I stumbled upon the 
`choices` attribute of `models.CharField`.

Could we allow lists to be passed to choices ?
`choices=['potato', 'carrot', 'turnip']`

Which would be the same as this :
`choices=[('potato', 'potato'), ('carrot', 'potato'), ('turnip', 'potato')]`

I understand that storing long strings in the database is not ideal. 
However, it feels like premature optimization that isn't very relevant to 
new Django users. Choices are needed very often in any kind of basic CRUD 
app, and this is something new users will often encounter quite early in 
their Django learning. Allowing a simple list input would reduce the 
cognitive load and make Django easier to learn.

Do you think this makes sense ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/53f30e25-2b05-4573-91a7-a3be013b3286%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.