diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:03:25 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:03:25 +0000 |
| commit | b6304b0f7dcba3e2cc25589055874fcc14bf0fda (patch) | |
| tree | e51f25eb6760ec9d1035cea74ee53f8d37f26e62 | |
| parent | 107dcf6a669f785692997fae34bb3f1cdc31c26b (diff) | |
automatic import of python-django-sms-toolkit
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-django-sms-toolkit.spec | 276 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 278 insertions, 0 deletions
@@ -0,0 +1 @@ +/django-sms-toolkit-0.1.6.tar.gz diff --git a/python-django-sms-toolkit.spec b/python-django-sms-toolkit.spec new file mode 100644 index 0000000..f589314 --- /dev/null +++ b/python-django-sms-toolkit.spec @@ -0,0 +1,276 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-sms-toolkit +Version: 0.1.6 +Release: 1 +Summary: It's a Django module to send and store SMS with Twilio. +License: Apache-2.0 +URL: https://github.com/Hipo/django-sms-toolkit +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/db/63/d23aecfc01622d5100c4978c6280050b2922cb173fd1a660662f6cd32d7b/django-sms-toolkit-0.1.6.tar.gz +BuildArch: noarch + + +%description +# Django SMS Toolkit + +Django module to send and store SMS with Twilio. + +## Releases + +To release a new version via github.com, follow the steps in this [link](https://help.github.com/en/articles/creating-releases). + +To release a new version via git commands, follow this [documentation](https://git-scm.com/book/en/v2/Git-Basics-Tagging). + +You can see the releases [here](https://github.com/Hipo/django-sms-toolkit/releases). + +## Versioning + +You can refer [here](https://semver.org/) for semantics of versioning. + +## Installation + +1. pip install `django-sms-toolkit`. + +2. Add **django_sms_toolkit** to the `INSTALLED_APPS` in the settings file. + +3. Configure settings. + +``` +DJANGO_SMS_TOOLKIT_SETTINGS = { + "SEND_SMS": True, # True by default. + "DEFAULT_FROM_NUMBER": "", + "TWILIO": { + "ACCOUNT_SID": "", + "AUTH_TOKEN": "", + "STATUS_CALLBACK_BASE_URL": "https://www.myapp.com", + "TRIM_LONG_BODY": True, # True by default. Makes sure character limit is not exceeded. + } +} +``` + +4. `python manage.py migrate` + +5. Include urls to be able to receive message status callbacks from Twilio. + +``` +urlpatterns = [ + ...., + url(r'^', include('django_sms_toolkit.urls')), +] +``` + +6. (Optional) Add `TwilioMessageMixin` to your auth user model. +``` +from django_sms_toolkit.models import TwilioMessageMixin + +class AuthUser(TwilioMessageMixin,...): + .... + +# Default from number provided in settings is used if from_number is not provided. +user.send_sms(body, from_number=None) +# OR +from django_sms_toolkit.tasks import send_sms +send_sms.delay(from_number, to_number, body, recipient_id=None) +``` + +## Support + +Please [open an issue](https://github.com/Hipo/django-sms-toolkit/issues/new) for support. + +## Contributing + +Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/Hipo/django-sms-toolkit/compare/). + +%package -n python3-django-sms-toolkit +Summary: It's a Django module to send and store SMS with Twilio. +Provides: python-django-sms-toolkit +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-sms-toolkit +# Django SMS Toolkit + +Django module to send and store SMS with Twilio. + +## Releases + +To release a new version via github.com, follow the steps in this [link](https://help.github.com/en/articles/creating-releases). + +To release a new version via git commands, follow this [documentation](https://git-scm.com/book/en/v2/Git-Basics-Tagging). + +You can see the releases [here](https://github.com/Hipo/django-sms-toolkit/releases). + +## Versioning + +You can refer [here](https://semver.org/) for semantics of versioning. + +## Installation + +1. pip install `django-sms-toolkit`. + +2. Add **django_sms_toolkit** to the `INSTALLED_APPS` in the settings file. + +3. Configure settings. + +``` +DJANGO_SMS_TOOLKIT_SETTINGS = { + "SEND_SMS": True, # True by default. + "DEFAULT_FROM_NUMBER": "", + "TWILIO": { + "ACCOUNT_SID": "", + "AUTH_TOKEN": "", + "STATUS_CALLBACK_BASE_URL": "https://www.myapp.com", + "TRIM_LONG_BODY": True, # True by default. Makes sure character limit is not exceeded. + } +} +``` + +4. `python manage.py migrate` + +5. Include urls to be able to receive message status callbacks from Twilio. + +``` +urlpatterns = [ + ...., + url(r'^', include('django_sms_toolkit.urls')), +] +``` + +6. (Optional) Add `TwilioMessageMixin` to your auth user model. +``` +from django_sms_toolkit.models import TwilioMessageMixin + +class AuthUser(TwilioMessageMixin,...): + .... + +# Default from number provided in settings is used if from_number is not provided. +user.send_sms(body, from_number=None) +# OR +from django_sms_toolkit.tasks import send_sms +send_sms.delay(from_number, to_number, body, recipient_id=None) +``` + +## Support + +Please [open an issue](https://github.com/Hipo/django-sms-toolkit/issues/new) for support. + +## Contributing + +Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/Hipo/django-sms-toolkit/compare/). + +%package help +Summary: Development documents and examples for django-sms-toolkit +Provides: python3-django-sms-toolkit-doc +%description help +# Django SMS Toolkit + +Django module to send and store SMS with Twilio. + +## Releases + +To release a new version via github.com, follow the steps in this [link](https://help.github.com/en/articles/creating-releases). + +To release a new version via git commands, follow this [documentation](https://git-scm.com/book/en/v2/Git-Basics-Tagging). + +You can see the releases [here](https://github.com/Hipo/django-sms-toolkit/releases). + +## Versioning + +You can refer [here](https://semver.org/) for semantics of versioning. + +## Installation + +1. pip install `django-sms-toolkit`. + +2. Add **django_sms_toolkit** to the `INSTALLED_APPS` in the settings file. + +3. Configure settings. + +``` +DJANGO_SMS_TOOLKIT_SETTINGS = { + "SEND_SMS": True, # True by default. + "DEFAULT_FROM_NUMBER": "", + "TWILIO": { + "ACCOUNT_SID": "", + "AUTH_TOKEN": "", + "STATUS_CALLBACK_BASE_URL": "https://www.myapp.com", + "TRIM_LONG_BODY": True, # True by default. Makes sure character limit is not exceeded. + } +} +``` + +4. `python manage.py migrate` + +5. Include urls to be able to receive message status callbacks from Twilio. + +``` +urlpatterns = [ + ...., + url(r'^', include('django_sms_toolkit.urls')), +] +``` + +6. (Optional) Add `TwilioMessageMixin` to your auth user model. +``` +from django_sms_toolkit.models import TwilioMessageMixin + +class AuthUser(TwilioMessageMixin,...): + .... + +# Default from number provided in settings is used if from_number is not provided. +user.send_sms(body, from_number=None) +# OR +from django_sms_toolkit.tasks import send_sms +send_sms.delay(from_number, to_number, body, recipient_id=None) +``` + +## Support + +Please [open an issue](https://github.com/Hipo/django-sms-toolkit/issues/new) for support. + +## Contributing + +Please contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/Hipo/django-sms-toolkit/compare/). + +%prep +%autosetup -n django-sms-toolkit-0.1.6 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-sms-toolkit -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.6-1 +- Package Spec generated @@ -0,0 +1 @@ +b73bc740b4484bb8ec66a5abd46ad94c django-sms-toolkit-0.1.6.tar.gz |
