Create a new project
pip install django-sms-uz,pip install djangorestframeworkandpip 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 migrateto create the database tablesStart your Django development server
python manage.py runserverand 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 show you if it was successful or not
You could use call
from SMS.sms_utils import SMS_Senderto get the SMS class and send sms using by the waySMS_Sender(phone_number, message).SendSmsOneContact()it returns a response
