Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:bread-and-pepper/django-userena
Browse files Browse the repository at this point in the history
  • Loading branch information
wunki committed Jul 22, 2013
2 parents a873c3a + f0d5721 commit 6bcc1e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 8 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ your project. This means modifying ``AUTHENTICATION_BACKENDS``,
Begin by adding ``userena``, ``guardian`` and ``easy_thumbnails`` to the
``INSTALLED_APPS`` in your settings.py file of your project.

Next add :class:``UserenaAuthenticationBackend`` and :class:``ObjectPermissionBackend``
Next add ``UserenaAuthenticationBackend`` and ``ObjectPermissionBackend``
also in your settings.py file, from django-guardian, at the top of ``AUTHENTICATION_BACKENDS``.
If you only have Django's default backend, adding django-guardian and that of userena will get
the following:
Expand Down Expand Up @@ -128,10 +128,10 @@ To use GMail SMTP, you may use the following code in your settings.py:
.. code-block:: python
EMAIL_USE_TLS = True
EMAIL_HOST = smtp.gmail.com
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = yourgmailaccount@gmail.com
EMAIL_HOST_PASSWORD = yourgmailpassword
EMAIL_HOST_USER = 'yourgmailaccount@gmail.com'
EMAIL_HOST_PASSWORD = 'yourgmailpassword'
See: `Django Email Documentation <https://docs.djangoproject.com/en/dev/topics/email/>`_

Expand All @@ -148,7 +148,7 @@ from them:
fields for privacy settings.

``UserenaLanguageBaseProfile``
Adds an extra field that let's the user define it's preferred language
Adds an extra field that lets the user define its preferred language
after logging in to your site.

**IMPORTANT**: The above profiles are ``abstract`` models. This means that you
Expand Down Expand Up @@ -179,8 +179,8 @@ model which has a language field. You can use the
The URI's
~~~~~~~~~

Userena has a ``URLconf`` which set's all the url's and views for you. This
should be included in your projects root ``URLconf``.
Userena has a ``URLconf`` which sets all the urls and views for you. This
should be included in your project's root ``URLconf``.

For example, to place the URIs under the prefix ``/accounts/``, you could add
the following to your project's root ``URLconf``.
Expand Down Expand Up @@ -219,7 +219,7 @@ under ``accounts``:
LOGIN_URL = '/accounts/signin/'
LOGOUT_URL = '/accounts/signout/'
The above should supply you with a fully functional account management app. for
The above should supply you with a fully functional account management app for
your project. You can look into the next chapter to fully customize userena to
your likings.

Expand Down
6 changes: 5 additions & 1 deletion userena/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class UserenaAdmin(UserAdmin, GuardedModelAdmin):
'is_staff', 'is_active', 'date_joined')
list_filter = ('is_staff', 'is_superuser', 'is_active')

admin.site.unregister(get_user_model())
try:
admin.site.unregister(get_user_model())
except admin.sites.NotRegistered:
pass

admin.site.register(get_user_model(), UserenaAdmin)
admin.site.register(get_profile_model())

0 comments on commit 6bcc1e1

Please sign in to comment.