In Speedy Net all usernames and slugs must be lowercase. If they are
entered not lowercase they are converted to lowercase. I don't see any
reason why usernames should not be lowercase, especially if there are 2
different users with usernames which differ only in case.

All email addresses in Speedy Net are also converted to lowercase and saved
lowercase in the database. I think it would be absurd if [email protected],
[email protected] and [email protected] would belong to 3 different people with 3
different usernames and email addresses.

From
https://github.com/speedy-net/speedy-net/blob/uri_merge_with_master_2018-12-31_a/speedy/core/accounts/tests/test_forms.py
:

    def test_slug_gets_converted_to_lowercase(self):
        data = self.data.copy()
        data['slug'] = 'THIS-IS-A-SLUG'
        form = RegistrationForm(language_code=self.language_code, data=data)
        form.full_clean()
        self.assertTrue(expr=form.is_valid())
        self.assertDictEqual(d1=form.errors, d2={})
        user = form.save()
        self.assertEqual(first=user.slug, second='this-is-a-slug')
        self.assertEqual(first=user.username, second='thisisaslug')

    def test_email_gets_converted_to_lowercase(self):
        data = self.data.copy()
        data['email'] = '[email protected]'
        form = RegistrationForm(language_code=self.language_code, data=data)
        form.full_clean()
        self.assertTrue(expr=form.is_valid())
        self.assertDictEqual(d1=form.errors, d2={})
        user = form.save()
        email_addresses = UserEmailAddress.objects.filter(user=user)
        email_addresses_set = {e.email for e in email_addresses}
        self.assertSetEqual(set1=email_addresses_set, set2={'
[email protected]'})



אורי (Uri)
[email protected]


On Sat, Jan 5, 2019 at 3:18 PM Shelagh Lewins <[email protected]>
wrote:

> I think case-insensitive usernames is a must-have in the mobile world.
> Users who register on mobile don't notice that their phone has
> automatically capitalised the first letter of their username when they
> enter it, and are then unable to log in on laptops because they are typing
> the lower-case version.
>
> And because case-sensitive usernames are so unexpected, developers are
> likely not to notice the problem until some way into the project.
>
> To expect every developer to modify the auth model because it doesn't
> provide standard functionality seems like the wrong approach to me.
>
> If there are concerns about backwards compatibility, why not make it an
> optional setting?
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/3b6d56fd-2664-4b56-8712-e76d51c73172%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/3b6d56fd-2664-4b56-8712-e76d51c73172%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CABD5YeFm3A2k7V8zeRPBxyu8zMv7msnmU1ogS_SrCJT76H_Fzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to