私はDjangoでプロジェクトを構築しており、現在、ユーザーのアクティビティを追跡する手段としてdjango-notificationを実装しようとしています。私はそれをインストールしていくつかの通知を作成することができましたが、それらは電子メールでのみ送信され、フィードビューに表示できるようにそれぞれのデータベースに保存されていません。
/ notification / feed /は現在、タイプエラーを表示しますが、それが関連しているかどうかわかりませんか?
/ notifys / feed / init()のTypeErrorは、正確に3つの引数を取ります(1つ指定)
何かアドバイスをいただければ幸いです。Pinaxが通知をどのように使用するかを見てきましたが、電子メールのみのバックエンドをどのように超えたかを理解できませんでした。
settings.pyで、「notification」とtemplate_context_processor「notification.context_processors.notification」を有効にしました。
urls.py
url(r'^note/', include('notification.urls')),
app / management.py
if "notification" in settings.INSTALLED_APPS:
from notification import models as notification
def create_notice_types(app, created_models, verbosity, **kwargs):
notification.create_notice_type("messages_received", _("Message Received"), _("you have received a message"), default=2)
signals.post_syncdb.connect(create_notice_types, sender=notification)
app / view.py
...
if notification:
notification.send([user], "messages_received", {'message': message,})
...
Notification.sendが実行され、これを確認しましたが、「notice」データベースには何も保存されていないようです。
追加する必要があります。私はdjango-notificationのBrianRosnerブランチを実行しています(https://github.com/brosner/django-notification)。