一个 Django 包,可以使用 FCM(Firebase 云消息传递)发送消息。
项目描述
django-fcm
==========
.. 图片:: https://badge.fury.io/py/django-fcm.svg
:target: https://badge.fury.io/py/ django-fcm
Firebase Cloud Messaging Server in Django
Quickstart
----------
通过``pip``安装包::
pip install django-fcm --process-dependency-links
添加``fcm`` ``settings.py`` 中的``INSTALLED_APPS``
.. 代码块:: python
INSTALLED_APPS = [
....,
fcm
]
将 ``FCM_APIKEY`` 添加到 ``settings.py`` 文件:
.. 代码-block :: python
FCM_APIKEY = "<api_key>"
添加 ``fcm urls`` 到 ``urls.py`` 文件:
.. code-block:: python
urlpatterns = [
...
url(r'', include('fcm.urls')),
...
]
Python 3 支持
----------------
``django-fcm`` 是完全兼容 Python 3.4 和 3.5
Django 支持
----------------
``django-fcm`` 完全兼容 Django 1.8、1.9 和 1.10
Django Rest Framework
----- -----------
``django-fcm`` 与 django-rest-framework 3.3.2 完全兼容。
文档:`https://django-fcm.readthedocs.org <https://django-fcm.readthedocs.org>`_
==========
.. 图片:: https://badge.fury.io/py/django-fcm.svg
:target: https://badge.fury.io/py/ django-fcm
Firebase Cloud Messaging Server in Django
Quickstart
----------
通过``pip``安装包::
pip install django-fcm --process-dependency-links
添加``fcm`` ``settings.py`` 中的``INSTALLED_APPS``
.. 代码块:: python
INSTALLED_APPS = [
....,
fcm
]
将 ``FCM_APIKEY`` 添加到 ``settings.py`` 文件:
.. 代码-block :: python
FCM_APIKEY = "<api_key>"
添加 ``fcm urls`` 到 ``urls.py`` 文件:
.. code-block:: python
urlpatterns = [
...
url(r'', include('fcm.urls')),
...
]
Python 3 支持
----------------
``django-fcm`` 是完全兼容 Python 3.4 和 3.5
Django 支持
----------------
``django-fcm`` 完全兼容 Django 1.8、1.9 和 1.10
Django Rest Framework
----- -----------
``django-fcm`` 与 django-rest-framework 3.3.2 完全兼容。
文档:`https://django-fcm.readthedocs.org <https://django-fcm.readthedocs.org>`_