Skip to main content

('Clone of Django Resgistration flow for Django Rest Framework',)

Project description

Clone of Django Resgistration flow for Django Rest Framework

Needs ‘django.contrib.sites’ and an email backend

Based on

StackOverflow answer http://stackoverflow.com/a/19337404

and

django-registration https://django-registration.readthedocs.org/

Install

$ pip install django-registration-rest-framework

Usage

settings.py

INSTALLED_APPS =
...
'registration_api',
...

# This setting is mandatory
REGISTRATION_API_ACTIVATION_SUCCESS_URL = '/'

urls.py

urlpatterns = patterns(
...
url(r'^accounts_api/', include('registration_api.urls')),
...
)

Front-end

From your front-end or mobile application send a post to the register url ‘accounts_api/register/’. The fields depends on your AUTH_USER_MODEL but should be something like

[{"username": "john", "email": "john@example.com", "password": "verylongpassword"}]

This will trigger an email to the addess specified by the user. When the user follows the link the account is activated.

Test

$ python tests/runtests.py [TestsCase[.test_method]]

or

$ python setup.py test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-registration-rest-framework-0.3.0.zip (13.5 kB view details)

Uploaded Source

File details

Details for the file django-registration-rest-framework-0.3.0.zip.

File metadata

File hashes

Hashes for django-registration-rest-framework-0.3.0.zip
Algorithm Hash digest
SHA256 90b8fe61e0ba12f1da176e4df40fb13a3309794afd6c09bca4d4f38c445df261
MD5 b3a486dc0571f960feddfa7c9d831599
BLAKE2b-256 f0d3b49c56bf676ec773a40b93d251a271f4345125afb398ceafbafe97e51363

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page