Skip to main content

Pluggable user accounts and profiles

django-uaccounts is a pluggable Django app that provides user registration, login/logout and a “forgot password” feature. Email verification is required for account activation and resetting password. The app also supports simple user profiles, with multiple email addresses that can be verified as well.

Installation

  • Download and install from PyPI:

pip install django-uaccounts
  • Add it to your INSTALLED_APPS, as well as ‘django.contrib.sites’:

INSTALLED_APPS = (
    ...
    'django.contrib.sites',
    ...
    'uaccounts',
    ...
)
  • Make sure you have a django.contrib.sites.models.Site instance saved in your database as django-uaccounts needs it to get the name and the domain of your site to include them in the verification emails.

  • Configure the email settings of your project as they are needed for sending the verification emails.

  • Include the urlconf of the app in your project’s urls.py:

from django.conf.urls import url, include

urlpatterns = [
    ...
    url(r'accounts/', include('uaccounts.urls', namespace='uaccounts')),
    ...
]

Of course, you can put it under any url you want, like r’’ or r’^mysite/myaccounts/’.

Usage

django-uaccounts can be a very simple standalone app, but its main purpose is to offer user account capabilities to your project, complementing your other apps. To test its usage on its own, you should be ready to go by now. However you probably want to let it know its “parent url”. This is a url to redirect to after a successful login, and provide a link for in the “profile” page, so the user can return to the main aspect of your website. This url can be set through the UACCOUNTS_HOME_URL setting.

Settings

All of the app settings are optional but you may want to modify them to customize to your needs, and most probably UACCOUNTS_HOME_URL to connect this app with the rest of your project.

  • UACCOUNTS_HOME_URL: The “parent url”. Can be an str or a call to django.core.urlresolvers.reverse_lazy.

    Default: django.core.urlresolvers.reverse_lazy(‘uaccounts:index’)

  • UACCOUNTS_USERNAME_MIN_LENGTH: Minimum allowed characters for username.

    Default: 4

  • UACCOUNTS_PASSWORD_MIN_LENGTH: Minimum allowed characters for password.

    Default: 6

  • UACCOUNTS_STATUS_MAX_LENGTH: Maximum allowed characters for status.

    Default: 200

  • UACCOUNTS_ACTIVATION_EXPIRES: Expiration time of an account activation request, in seconds. Can be an int or None for limitless time.

    Default: 24 * 60 * 60

  • UACCOUNTS_CHANGE_PASSWORD_EXPIRES: Expiration time of a “forgot password” request, in seconds. Can be an int or None for limitless time.

    Default: 60 * 60

  • UACCOUNTS_VERIFICATION_EXPIRES: Expiration time of an email verification request, in seconds. Can be an int or None for limitless time.

    Default: None

  • UACCOUNTS_AVATAR_DIR: Directory for uploading user avatars. It gets appended to your MEDIA_ROOT.

    Default: ‘avatars/’

  • UACCOUNTS_AVATAR_MAX_HEIGHT: Maximum allowed height for user avatars, in pixels. Avatars get resized (kept in scale) if this is exceeded.

    Default: 200

  • UACCOUNTS_AVATAR_MAX_WIDTH: Maximum allowed width for user avatars, in pixels. Avatars get resized (kept in scale) if this is exceeded.

    Default: 200

License

BSD

Author

Aristotelis Mikropoulos <amikrop@gmail.com>

Release files for django-uaccounts 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-uaccounts 0.1.7
File Size Uploaded
django-uaccounts-0.1.7.zip 61.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for django-uaccounts 0.1.7
File Interpreter ABI Platform
django_uaccounts-0.1.7-py2-none-any.whl Python 2 none any Details
django-uaccounts-0.1.7.win32.exe Details

Total release size: 374.5 kB

Release files / django-uaccounts-0.1.7.zip

Download URL django-uaccounts-0.1.7.zip
Size 61.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bc6b0231eaaeacd03fd7fe5a986013097d9509f81e6fdf98614f16c9a62c8255
BLAKE2b-256 checksum
How to use checksums
9b92bee223906185439553ba627d694b3ad69459f69c4163ce81ba5b599a9a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_uaccounts-0.1.7-py2-none-any.whl

Download URL django_uaccounts-0.1.7-py2-none-any.whl
Size 57.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
f01932305e8e21189a5284a59f2cc88d85d4e2c7df6a9e32b7fdd9ec4a2f93f9
BLAKE2b-256 checksum
How to use checksums
b0f3c897cf2b00788f7014757e6cbb25ac1bc89f5b902423086127fb2be83d30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-uaccounts-0.1.7.win32.exe

Download URL django-uaccounts-0.1.7.win32.exe
Size 255.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b8588202006587f73d30996db1ea4113720c13800061fafb7c8f2b77c66514a3
BLAKE2b-256 checksum
How to use checksums
3d06612cf5abc5d2e2f14b24cdcd9557d6617c66a915dfc9865edd49ab7bc9de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.7 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page