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
Add “verification” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ... 'verification', ]
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.
connect your urls to your views.
5. Run python manage.py makemigrations to create the verification models migrations. It depends on your User model.
Run python manage.py migrate to create the verification models.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-rest-verification-0.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65db9417179555f487471b273f8aae87c93e14782b37d57d960e2f00f98f6b09 |
|
MD5 | 834411d5112766b1332b7031e7eb3e6e |
|
BLAKE2b-256 | 94813b752e09662dfbe8b7c2c315a60e4b8db2cfe1db9e31d17c8333aa7a0435 |