Commits

Tino de Bruijn committed d6fb857

Make package ready for PyPi

  • Participants
  • Parent commits 1727de0

Comments (0)

Files changed (6)

+Copyright (C) 2011 by Tino de Bruijn
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+The software is provided "as is", without warranty of any kind, express or
+implied, including but not limited to the warranties of merchantability,
+fitness for a particular purpose and noninfringement. In no event shall the
+authors or copyright holders be liable for any claim, damages or other
+liability, whether in an action of contract, tort or otherwise, arising from,
+out of or in connection with the software or the use or other dealings in
+the software.
+include README.txt LICENCE.txt
+recursive-include email_login/templates *.html
+recursive-include locale *

File README.rst

-==================
-django-email-login
-==================
-
-Goals
-=====
-
-The goal of this app is to easily transform django's auth system to allow
-login with an email adress, 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.
-
-Usage
-=====
-
-1. Append ``'email_login'`` to your ``INSTALLED_APPS`` setting
-#. Insert ``'email_login.auth_backend.EmailBackend'`` as first in the 
-   ``AUTHENTICATION_BACKENDS`` settings tuple.
-#. 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
-    
-#. 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``.
-   
-#. 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.
-
-.. _django-user-creation: http://bitbucket.org/tino/django-user-creation
+==================
+django-email-login
+==================
+
+Goals
+=====
+
+The goal of this app is to easily transform django's auth system to allow
+login with an email adress, 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.
+
+Usage
+=====
+
+1. Append ``'email_login'`` to your ``INSTALLED_APPS`` setting
+#. Insert ``'email_login.auth_backend.EmailBackend'`` as first in the 
+   ``AUTHENTICATION_BACKENDS`` settings tuple.
+#. 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
+    
+#. 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``.
+   
+#. 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.
+
+.. _django-user-creation: http://bitbucket.org/tino/django-user-creation

File email_login/__init__.py

+__version__ = '0.2'
  
 from distutils.core import setup
 
-packages = ['email_login']
-
 setup(
     name='email_login',
     version='0.2',
     description='A Django application that enables you to have your users use their email address instead of their username',
+    long_description=open('README.txt').read(),
+    licences='MIT License, see LICENSE.txt',
     author='Tino de Bruijn',
     author_email='tinodb@gmail.com',
-    packages=packages,
+    url='http://bitbucket.org/tino/django-email-login',
+    packages=['email_login'],
     zip_safe=False,
+    classifiers=[
+        'Programming Language :: Python',
+        'License :: OSI Approved :: MIT License',
+        'Operating System :: OS Independent',
+        'Development Status :: 4 - Beta',
+        'Environment :: Web Environment',
+        'Framework :: Django',
+        'Intended Audience :: Developers',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+    ]
 )