Django-SMS

Nowadays, many people are using Python's Django framework, and many websites need to work with SMS. Through this package, you can now work quickly with SMS on the site 🙂

View the Project on GitHub firdavsDev/Django-SMS

#Django send SMS using API(uz)

You can use the Django SMS to quickly add SMS sender app in your Django project.

Quickly start

  1. Create a new project
  2. pip install django-sms-uz , pip install djangorestframework and pip install requests
  3. Add the following to your settings.py file:
  4. 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
  5. Add the following to your urls.py file: path('sms/', include('SMS.urls')),
  6. Run python manage.py migrate to create the database tables
  7. Start your Django development server python manage.py runserver and go to http://localhost:8000/sms/send_sms/
  8. Enter your phone number and message and click send
  9. Check your terminal for a response and Django admin will tell you if it was successful or not
  10. 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
  11. 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

Required packages:

pip install django-sms-uz
pip install djangorestframework
pip install requests

For more details see documentation.

Contact

If you have other addition ideas or face to face with any bugs in this Django package You can create in GitHub issues. Help develop other DJango SMS versons !!!