diff --git a/docs/installation.rst b/docs/installation.rst index 8041cdf2..7b56d3cd 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -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: @@ -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 `_ @@ -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 @@ -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``. @@ -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. diff --git a/userena/admin.py b/userena/admin.py index bd66de71..912bb30d 100644 --- a/userena/admin.py +++ b/userena/admin.py @@ -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())