Django restful api login with Email and Mobile no. In this we get custom created authentication system. We can register with our mobile or email after register verification OTP sent to email and mobile. Both email and mobile has different OTP. so when user input the OTP from email then email verified and if OTP input from mobile then mobile varified. User also sent the resent OTP if mail or SMS not found.
https://github.com/harryanand060/django_rest/wiki
compatible with >=django 3.0
compatible with django2.0
compatible with >=django3.0
-
Download or clone project from git.
for WINDOWS Install Git Bash
after install the Git Bash
-
Create project with virtual environment also install pip pip.
-
Install prerequisites
pip isntall -r requirement.txt
(after coping the project to your directory where you create projcet).
-
Inside app we have .env.test rename to .env and then update
Generate SECRET_KEY
python manage.py generate_key -sp -d app
Database Settings
DATABASE_NAME=db_name DATABASE_USER=root DATABASE_PASSWORD= DATABASE_HOST=localhost
EMAIL Setting
EMAIL_HOST_USER = '***@gmail.com' EMAIL_HOST_PASSWORD = ''.
SMS Getway Setting
'url': 'http://sms.abc.com/sendSMS', 'apikey': '**********************', 'username': '', 'sendername': '', 'smstype': '********'.
-
now open terminal and path set to your current project and run
python manage.py makemigrations
python manage.py migrate
-
now create super user
```bash python manage.py createsuperuser ```
and follow the steps.
-
now Run
python manage.py runserver
#Testing
Open the browser with given runserver IP for ex: http://127.0.0.1:8000/ Here you get all the listed API Docs