semvec/pypi-packages huggingface dataset:
django-verified-email-field 1.10.1
Simple model and form field to get verified email
License: BSD

django-verified-email-field
===========================

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 <https://code.jquery.com/>`__ 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 <verified_email_field/settings.py>`__ and
`fieldsetup.py <verified_email_field/fieldsetup.py>`__ for more
information)

Installation
------------

.. code:: bash

   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'``:

.. code:: python

   from django.conf.urls import url, include

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

Usage
-----

Use ``VerifiedEmailField`` in Your forms:

.. code:: python

   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:

.. code:: python

   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 <https://code.jquery.com/>`__ is
included in Your page.