Skip to main content

Simple model and form field to get verified email

Project description

Simple model and form field to get verified email

Renders two input fields: e-mail and verification code. The verification code is send to the e-mail address using AJAX or during field’s clean, if there is no valid code for given e-mail, so it works even without javascript. For the javascript to work properly You need to have jQuery included in Your page.

All the texts and email templates may be configured in settings and overidden by field’s keyword arguments. (See settings.py and fieldsetup.py for more information)

Installation

pip install django-verified-email-field

Configuration

  1. add 'verified_email_field' to Your settings.INSTALLED_APPS

  2. include verified_email_field.urls in your project’s urls.py using namespace 'verified-email-field':

from django.conf.urls import url, include

urlpatterns = [
    ...
    url(r'^verified-email-field/', include('verified_email_field.urls')),
    ...
]

Usage

Use VerifiedEmailField in Your forms:

from django import forms
from verified_email_field.forms import VerifiedEmailField

class RegistrationForm(forms.ModelForm):
    email = VerifiedEmailField(label='email', fieldsetup_id='registration-form-email', required=True)

Or in Your models:

from django.db import models
from verified_email_field.models import VerifiedEmailField

class User(models.Model):
    email = VerifiedEmailField('e-mail', fieldsetup_id='user-email')

Ensure that form.media.js ({{ form.media.js }}) is being rendered in your template and jQuery is included in Your page.

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_verified_email_field-1.10.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_verified_email_field-1.10.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file django_verified_email_field-1.10.1.tar.gz.

File metadata

File hashes

Hashes for django_verified_email_field-1.10.1.tar.gz
Algorithm Hash digest
SHA256 3c3f4376aac4ba6df8704d1b2ab0cc0037acc279b6b0ddd1ed590c3e198e0760
MD5 060cc52189a7b1d050ad080de6d38521
BLAKE2b-256 9a1d30836b4514648dfaabe8d018df98fed6573b1252f1cfbed760531b0240ea

See more details on using hashes here.

File details

Details for the file django_verified_email_field-1.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_verified_email_field-1.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38f16ac59a3f92039dad765af72a7c7aef8e63c43cae79fe400f9f3395182ee8
MD5 50b252370ff7d181baf6aab192abb44c
BLAKE2b-256 4026acba8b1a8635a709b0ee1fcac5943e760911ed80bf157a51febc8230a9ee

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