通过 API Rest 暴露的 django 通知包
项目描述
django-notifications-rest文档
django-notifications-rest为django-notifications-hq.
要求
- 蟒蛇 3.5、3.6、3.7、3.8
- Django 2.2、3.0、3.1
- django-notifications-hq 最新版本
- djangorestframework 最新版本
安装
安装使用pip. 您需要手动安装所需的django-notifications-hq软件包djangorestframework。
$ pip install django-notifications-rest
或从源头获取
$ git clone https://github.com/yhdelgado/django-notifications-rest.git
$ cd django-notifications-rest
$ python setup.py sdist
$ pip install dist/django-notifications-rest*
然后将 Django Notifications Rest 添加到您的项目中,将应用程序添加notifications_rest到您的INSTALLED_APPS和 urlconf 中。
该应用程序应该在所有将生成通知的应用程序之后去某个地方,例如django.contrib.auth
INSTALLED_APPS = (
'django.contrib.auth',
'rest_framework',
'notifications'.
...
'notifications_rest',
...
)
将通知网址添加到您的 urlconf::
urlpatterns = [
...
url('^notifications/', include('notifications_rest.urls')),
...
]
如果安装的django版本>=3.1,那么::
from django.urls import path, include
urlpatterns = [
...
path('^notifications/', include('notifications_rest.urls')),
...
]
要运行架构迁移,请执行python manage.py migrate.
项目详情
关
django_notifications_rest -0.0.1-py2.py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | dc9bfd7c33a15f109871974694bd25a014324d1503dd54bdacd4b7fadcb2406a |
|
| MD5 | 609ad120b0a8495ea441bf72e61083ba |
|
| 布莱克2-256 | a27cf99bd53963cabf4319fec84ba70298b7a01ab32896e2cb62b65346008b39 |