Skip to main content

Django application to embed all the registration stuff with captcha

Project description

Introduction

Sveetchies-account is a Django application to embed all the registration stuff using django-registration and django-simple-captcha.

This is not really intended to be a generic app, so use it at your own risk.

Actually this is just an implementation of an inherited django-registration backend with django-simple-captcha usage and with a UserProfileBase abstract model (and his form, and his form view) that can be used as a base for user profiles.

A REGISTRATION_BLOCKED optionnal variable can be added in settings, if at True the new registration form is blocked, default is False.

Requires

Optionnal

Install

PIL issue

If you are installing this module within a virtualenv, you would have issue with PIL that probably won’t be compiled with the Freetype support that is used by django-simple-captcha.

To resolve this, uninstall your PIL install within your virtualenv :

pip uninstall PIL

Then you will have to install Freetype2 devel library on your system with your prefered package manager, then install Pillow :

pip install Pillow

It will detect the devel libraries from your system and will compile with their support, problem resolved.

Settings

In your settings file add the app to your installed apps :

INSTALLED_APPS = (
    ...
    'sveeaccounts',
    ...
)

Then you have to mount its urls map in your webapp urls.

Usage

If you have installed django-crispy-forms you can specify your own form helper for registration and login forms. To do this you will have to specify the full Python path to your helper methods to use.

In your settings add these variables :

  • REGISTRATION_FORM_HELPER for the registration form;

  • REGISTRATION_LOGIN_HELPER for the login form;

  • REGISTRATION_USERPROFILE_HELPER for the optional userprofile edit form if you use it;

The methods which these Python path point just have to return the helper you did, see the sveeaccounts.crispies code for samples.

Note that if you use django-crispy-forms you will have to override template form like login.html and registration.html to add the django-crispy-forms tags usage.

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

sveeaccounts-0.2.4.2.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file sveeaccounts-0.2.4.2.tar.gz.

File metadata

File hashes

Hashes for sveeaccounts-0.2.4.2.tar.gz
Algorithm Hash digest
SHA256 b7adb1e490b2c2ade6b58d61fc11d6f7f410364f3ddabae032c810a12940d370
MD5 dcb257fe94c8e5de0a2692d9a324fda4
BLAKE2b-256 872b8aecae3df624627b184b688e5977e3d22b463e891d31106f5a2b2bdc9de0

See more details on using hashes here.

Supported by

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