Skip to main content

A Django app to conduct code-based verification.

Project description

Verification is a Django app to conduct code-based verifications. For any verification, email or phone, it can be used.

Detailed documentation is in the “docs” directory.

Quick start

  1. Add “verification” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'verification',
    ]
  2. Write yuor preferred settings in settings file:

    VERIFICATION = {
        'VERIFICATIONS': [
            {'type': 'email', 'user_model_field': 'is_email_verified'},],
    
        'CODE_LENGTH': 6,
        'CONTAINS_NUMERIC': True,
        'CONTAINS_UPPER_ALPHABETIC': False,
        'CONTAINS_LOWER_ALPHABETIC': False,
        'LIFE_TIME_SECOND': 0,
        'LIFE_TIME_MINUTE': 3,
        'LIFE_TIME_HOUR': 0,
        'LIFE_TIME_DAY': 0,
        'LIFE_TIME_PENALTY_SECOND': 60,
    
    }

2. Inherit from verification.views “BaseGenerateVerificationAPIView” and “BaseVerifyVerificationAPIView” classes.

3. Write your preferred function for sending code and In class that inherits from “BaseGenerateVerificationAPIView” set it to “send_code_function” variable.

  1. Connect your urls to your views.

  2. Run python manage.py migrate to create the verification models.

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-rest-verification-0.42.tar.gz (7.6 kB view details)

Uploaded Source

File details

Details for the file django-rest-verification-0.42.tar.gz.

File metadata

  • Download URL: django-rest-verification-0.42.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for django-rest-verification-0.42.tar.gz
Algorithm Hash digest
SHA256 839af669008943306fa9c3d274e7fb56aff8f7290dd7f108e9fcdc2aafadeb4a
MD5 45f0fef64687d6be8925780e74b6c1dd
BLAKE2b-256 e402d3ba513710d869979e0b6d3e0c5fcba6a8961d70f83cf2d24d93f1678196

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