这个可重复使用的 Django 应用程序可以帮助您通过 Google 日历发送短信。
项目描述
Django上的免费短信通知
====================================
.. image:: https:// api.travis-ci.org/gotlium/django-calendar-sms.png?branch=master
:alt: 构建状态
:target: https://travis-ci.org/gotlium/django-calendar-sms
.. 图片: :https
://coveralls.io/repos/gotlium/django-calendar-sms/badge.png?branch=master :目标:https://coveralls.io/r/gotlium/django-calendar-sms?branch=master
.. image:: https://pypip.in/v/django-calendar-sms/badge.png
:alt: PyPi 上的当前版本
:target: https://crate.io/packages/django-calendar-sms/
.. 图片:: https://pypip.in/d/django-calendar-sms/badge.png
:alt: 从 PyPi 下载
:target: https://crate.io/packages/django-calendar-sms/
那是什么
-----------
这个可重复使用的 Django 应用程序可以帮助您通过
Google 日历(免费)发送短信你的 Django 项目。
安装:
-------------
.. code-block:: bash
$ pip install django-calendar-sms
2. 在你的设置中添加``calendar_sms``应用到``INSTALLED_APPS``文件(通常是 ``settings.py``)
3. 同步数据库(``./manage.py syncdb``)
演示:
----
.. code-block:: bash
$ sudo apt-get install virtualenvwrapper
$ mkvirtualenv django-calendar-sms
$ git clone https://github.com/gotlium/django-calendar-sms.git
$ cd django-calendar-sms
$ python setup.py develop
$ cd demo
$ pip install -r requirements.txt
$ python manage.py syncdb
$ python manage.py migrate
$ python manage.py shell
Usage:
------
1. 设置 Google 帐户数据管理面板上的当前网站
2. 尝试从 shell (``./manage.py shell``) 发送短信:
.. code-block:: python
>>> from calendar_sms.sms import sendSMS
>>> print sendSMS('你好,世界!')
在后台发送短信:
------------------------
1. 安装 ``django-celery``:
.. code-block :: bash
$ pip install django-celery
2. 将 ``djcelery`` 应用程序添加到 settings.py 中的 ``INSTALLED_APPS``
3. 将 django-calendar-sms 配置添加到项目设置中:
.. code-block:: python
CELERY_IMPORTS = ('calendar_sms',)
4. 同步数据库 (``./manage.py syncdb``)
5. 运行 Rabbit- MQ:
.. code-block:: bash
$ sudo rabbitmq-server -detached
6. 在项目目录中运行 celery daemon:
.. code-block:: bash
$ nohup python manage.py celery worker >& /dev/null &
7 . 尝试发送短信:
.. code-block:: python
>>> from calendar_sms.tasks import SMSSend
>>> SMSSend.delay('Hello, World (background task)!')
| **您可以在一个或多个站点上使用多个帐户**
兼容性:
-------------
* Python:2.6、2.7
* Django: 1.3.x, 1.4.x, 1.5.x, 1.6
.. 图片:: https://d2weczhvl823v0.cloudfront.net/gotlium/django-calendar-sms/trend.png
:alt: Bitdeli 徽章
:target: https://bitdeli.com/free
====================================
.. image:: https:// api.travis-ci.org/gotlium/django-calendar-sms.png?branch=master
:alt: 构建状态
:target: https://travis-ci.org/gotlium/django-calendar-sms
.. 图片: :https
://coveralls.io/repos/gotlium/django-calendar-sms/badge.png?branch=master :目标:https://coveralls.io/r/gotlium/django-calendar-sms?branch=master
.. image:: https://pypip.in/v/django-calendar-sms/badge.png
:alt: PyPi 上的当前版本
:target: https://crate.io/packages/django-calendar-sms/
.. 图片:: https://pypip.in/d/django-calendar-sms/badge.png
:alt: 从 PyPi 下载
:target: https://crate.io/packages/django-calendar-sms/
那是什么
-----------
这个可重复使用的 Django 应用程序可以帮助您通过
Google 日历(免费)发送短信你的 Django 项目。
安装:
-------------
.. code-block:: bash
$ pip install django-calendar-sms
2. 在你的设置中添加``calendar_sms``应用到``INSTALLED_APPS``文件(通常是 ``settings.py``)
3. 同步数据库(``./manage.py syncdb``)
演示:
----
.. code-block:: bash
$ sudo apt-get install virtualenvwrapper
$ mkvirtualenv django-calendar-sms
$ git clone https://github.com/gotlium/django-calendar-sms.git
$ cd django-calendar-sms
$ python setup.py develop
$ cd demo
$ pip install -r requirements.txt
$ python manage.py syncdb
$ python manage.py migrate
$ python manage.py shell
Usage:
------
1. 设置 Google 帐户数据管理面板上的当前网站
2. 尝试从 shell (``./manage.py shell``) 发送短信:
.. code-block:: python
>>> from calendar_sms.sms import sendSMS
>>> print sendSMS('你好,世界!')
在后台发送短信:
------------------------
1. 安装 ``django-celery``:
.. code-block :: bash
$ pip install django-celery
2. 将 ``djcelery`` 应用程序添加到 settings.py 中的 ``INSTALLED_APPS``
3. 将 django-calendar-sms 配置添加到项目设置中:
.. code-block:: python
CELERY_IMPORTS = ('calendar_sms',)
4. 同步数据库 (``./manage.py syncdb``)
5. 运行 Rabbit- MQ:
.. code-block:: bash
$ sudo rabbitmq-server -detached
6. 在项目目录中运行 celery daemon:
.. code-block:: bash
$ nohup python manage.py celery worker >& /dev/null &
7 . 尝试发送短信:
.. code-block:: python
>>> from calendar_sms.tasks import SMSSend
>>> SMSSend.delay('Hello, World (background task)!')
| **您可以在一个或多个站点上使用多个帐户**
兼容性:
-------------
* Python:2.6、2.7
* Django: 1.3.x, 1.4.x, 1.5.x, 1.6
.. 图片:: https://d2weczhvl823v0.cloudfront.net/gotlium/django-calendar-sms/trend.png
:alt: Bitdeli 徽章
:target: https://bitdeli.com/free