On Fri, Jul 26, 2013 at 10:43 PM, JJ Zolper <codinga...@gmail.com> wrote:

> Hello everyone,
>
> So I want to say thanks to the Django guys for providing more support for
> those of us that want to use a user's email as the UID and login handler
> versus the previous method of handling based on the username. I and
> probably many others appreciate the effort given to the topic and that it
> was integrated into Django 1.5.
>
> Today I would like to request a continuing expansion about this concept.
>
> In referencing this link:
>
>
> https://geekwentfreak-raviteja.rhcloud.com/2012/12/custom-user-models-in-django-1-5/
>
> I would like to request that if we want to make email the UID we don't
> have to do things such as:
>
> class MyUser(AbstractBaseUser, PermissionsMixin):
>     ....
>     is_staff = models.BooleanField('staff status', default=False,
>         help_text='Designates whether the user can log into this admin '
>                     'site.')
>     is_active = models.BooleanField('active', default=True,
>         help_text='Designates whether this user should be treated as '
>                     'active. Unselect this instead of deleting accounts.')
>
>     def get_full_name(self):
>         full_name = '%s %s' % (self.first_name, self.last_name)
>         return full_name.strip()
>
>     def get_short_name(self):
>         return self.first_name
>
> just to retain what could already be apart of Django. You guys know more
> about Django then I ever will and what the best way is to go about it but
> if we can eliminate additional code that is already in Django that would be
> wonderful.
>
> Now in referencing:
>
>
> http://stackoverflow.com/questions/16638414/set-email-as-username-in-django-1-5
>
> Basically what I'm saying is, we shouldn't have to do what this fellow had
> to do:
>
> Unfortunately there's nothing within django.contrib.auth that you can
> simply subclass to get a model that has
>
>    1.
>
>    email address in place of user name and
>    2.
>
>    works nicely with other django.contrib.auth-stuff, like groups.
>
> The simplest approach is to copy models.py, admin.py and forms.py from
> django.contrib.auth, rip out user name all over the place and put in
> email address in it's place. I've done just that and I'm using it
> successfully in a couple of client projects.
>
> I've put it up on github and pypi so you can install it with
>
> pip install django-libtech-emailuser
>
>
> I thank you for your time and I appreciate your consideration for
> integrating this once and for all into Django.
>

Hi JJ,

That's a fair comment -- "Email address as username" is a sufficiently
common use case that it probably warrants being included in Django's core.
I think I've overheard Jacob endorsing the same thing at some point in the
past (although I'll stand corrected on this if I
misheard/misunderstood/misattributed his comments).

If you've already done the heavy lifting here, then all we need to do is
massage your external package into contrib. Open a ticket and we can see
what we can do about getting this in for 1.7.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to