如何安装 Django 通知?

发布于 2024-10-08 00:07:45 字数 328 浏览 2 评论 0原文

https://github.com/jtauber/django-notification

它没有说明任何有关安装的信息。

我如何导入它?我应该把它放在 INSTALLED_APPS 中什么,因为 django.notification 不起作用。

好的,它在我的站点包中为“django_notification-0.2a1.dev4-py2.6.egg”,

如何将其导入到我的views.py和settings.py中?

https://github.com/jtauber/django-notification

It doesn't say anything about installing.

How do I import it? What do I put it inside the INSTALLED_APPS, because django.notification doesn't work.?

Ok, it's inside my site-packages as "django_notification-0.2a1.dev4-py2.6.egg "

How do I import this into my views.py and also my settings.py?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

若无相欠,怎会相见 2024-10-15 00:07:45

伊格纳西奥的回答令人困惑。 (我花了 20 分钟搞乱通知包)。 Kedar 的答案更好,但仍然令人困惑。这是我安装并开始使用 django-notification 的最简单方法:

pip install django-notification

settings.py:

INSTALLED_APPS = (
    ...
    'notification',
    ...
)

views .py:

from notification import models as notification

notification.send([user], 'notice_type_label', context)

Ignacio's answer is confusing. (I spent 20 minutes messing with the notification package). Kedar's answer is better but still confusing. Here's the simplest way I installed and started using django-notification:

pip install django-notification

settings.py:

INSTALLED_APPS = (
    ...
    'notification',
    ...
)

views.py:

from notification import models as notification

notification.send([user], 'notice_type_label', context)
停顿的约定 2024-10-15 00:07:45

如果您查看 .egg 内部,您会发现该包名为“notification”。

If you look inside the .egg, you'll see that the package is called "notification".

长不大的小祸害 2024-10-15 00:07:45
  1. 只需下载通知包即可。
  2. 转到下载的路径。
  3. 需要安装,可以通过以下方式完成:

    $ pip install django-notification

    easy_install django-notification

    python setup.py install

    现在您的通知包将被安装

  4. 在您的 INSTALLED_APPS 中添加通知
    例如
    INSTALLED_APPS = ('',
    '',...,
    'notification')

  1. Just download notification package.
  2. go to path where does it get downloaded.
  3. Its needed to install which can be done in following ways :

    $ pip install django-notification
    or

    easy_install django-notification
    or

    python setup.py install

    Now your notification package will get installed

  4. Add notification in your INSTALLED_APPS
    e.g.
    INSTALLED_APPS = ('',
    '',...,
    'notification')

十秒萌定你 2024-10-15 00:07:45

您可以从以下位置使用此包

pip install django-notifications-hq


https://pypi.org/project/django-notifications-hq/

you can use this package

pip install django-notifications-hq

from:
https://pypi.org/project/django-notifications-hq/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文