SMS sending api for django
Project description
Create a new project
pip install django-sms-uz==1.0.0, pip install djangorestframework and pip install requests
Add the following to your settings.py file: INSTALLED_APPS = ( … ‘SMS’, … ) SMS_SETTINGS = {“SMS_URL”: “http://91.204.239.44/broker-api/send”,”SMS_LOGIN”: “LOGIN”,”SMS_PASSWORD”: “PASSWORD”} set in your settings.py file
- Add the following to your urls.py file:
path(‘sms/’, include(‘SMS.urls’)),
Run python manage.py migrate to create the database tables
Start your Django development server python manage.py runserver and go to http://localhost:8000/sms/send_sms/
Enter your phone number and message and click send
Check your terminal for a response and Django admin will tell you if it was successful or not
You could use call from SMS.sms_utils import SMS_Sender to get the SMS class and send sms using by the way SMS_Sender(phone_number, message).SendSmsOneContact() it returns a response
Don’t forget to add SMS to your INSTALLED_APPS list and add SMS_SETTINGS = {“SMS_URL”: “http://91.204.239.44/broker-api/send”,”SMS_LOGIN”: “LOGIN”,”SMS_PASSWORD”: “PASSWORD”} set in your settings.py file
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-sms-uz-1.0.1.tar.gz.
File metadata
- Download URL: django-sms-uz-1.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
452bd9abb5ccd86aa5cddf4f688497b22fde16dfe4f936e7fc9e4cee37a411ed
|
|
| MD5 |
a97ec464924a272b2736b5903415f153
|
|
| BLAKE2b-256 |
36de2027a8e2b212a6f40a466f9e2be9bb7e605971f6738b990c4925894c7c1b
|
File details
Details for the file django_sms_uz-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_sms_uz-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04115b666e87447468b04cd7f192b94d86407740e45c66ba1441ff7616200647
|
|
| MD5 |
6c3fb9380cb1d041c2a5dee7038597e0
|
|
| BLAKE2b-256 |
7172a1f2fb0a882c8e5cedd62c80914d7d18ba08c1069b81043a2d3ba0f888dc
|