Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-email-login 0.2.3

    Download button

    No screenshots available
    Downloads: 88  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tino de Bruijn | More programs
    MIT/X Consortium Lic... / FREE
    April 4th, 2012, 02:38 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-email-login description

    A Django application that enables you to have your users use their email address instead of their username

    django-email-login is a Django app that will easily transform Django's auth system to allow login with an email address, instead of a username.This should work inside the admin as well as outside. Therefore, email adresses need to be unique.

    The username of the User will be the hash of it's email adress. As it means nothing, it will be hidden in the admin changelist view.

    Install

    Install with pip install django-email-login or checkout from Bitbucket hg clone https://bitbucket.org/tino/django-email-login and run Python setup.py install.

    Usage

    1. Append 'email_login' to your INSTALLED_APPS setting

    2. Insert 'email_login.auth_backend.EmailBackend' as first in the AUTHENTICATION_BACKENDS settings tuple.

    3. Add the following in you root urls.py after admin.autodiscover():

     # Insert email_login overrides
     from email_login import useradmin, adminsite
     site = adminsite.EmailLoginAdminSite()
     # duplicate the normal admin's registry until ticket #8500 get's fixed
     site._registry = admin.site._registry


    4. Instead of using:

     # Uncomment the next line to enable the admin:
     (r'^admin/', include(admin.site.urls)),


     use:

     # Uncomment the next line to enable the admin:
     (r'^admin/', include(site.urls)),


     to include the admin in your root urls.py.

    5. To use login outside of the admin, add:

     (r'^account/', include('email_login.urls')),

     to your urls.py

    Note

    Your admin account needs to have an email address, otherwise you won't be able to sign in!

    Note

    The admin will display the username in the top right corner of the logged in user if the user has no firstname. If you want to override that, over- ride the admin/base.html template.

    In conjunction with django-user-creation

    If you want to use this app in conjunction with django-user-creation, you have to create your own ModelAdmin for User. You may do so by adding a useradmin.py file to your project with the following contents:

    from django.contrib import admin
    from django.contrib.auth.models import User
    from user_creation.forms import EmailAccountCreationForm
    from email_login.useradmin import EmailLoginAdmin


    class MyUserAdmin(EmailLoginAdmin):
     add_form = EmailAccountCreationForm
     add_fieldsets = (
     (None, {
     'classes': ('wide',),
     'fields': ('email', 'password1', 'password2', 'email_user')}
     ),
     )

    admin.site.unregister(User)
    admin.site.register(User, MyUserAdmin)


    and adding the line import useradmin to your urls.py after the overrides described above.


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    Django auth | email login | Django | email | login

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM