2011-01-07 18 views
2

私はこの1つを使用しています:https://github.com/pinax/django-notification/blob/master/docs/usage.txtDjango通知でこのエラーが発生するのはなぜですか?

私はすべての手順に従っています。

from notification import models as notification 

#first, create the notification type. 
notification.create_notice_type("comment_received", ("Comment Received"), ("You have received a comment.")) 

#then, send the notification. 
notification.send(request.user, "comment_received", {}) 

私のテンプレートディレクトリではもちろん、ドキュメントのように「通知」を作成しました。これらのファイルは今空白になってい

full.html、notice.html、

  • full.txt、short.txt:/templates/notification/comment_receivedインサイド

    は、私は4つのファイルを持っています。彼らはちょうどランダムな文を言う。

    通知を送信しようとすると、このエラーが発生します。

    Exception Type: NoReverseMatch at/
    Exception Value: Reverse for 'notification_notices' with arguments '()' and keyword arguments '{}' not found. 
    

答えて

5

適切なURL設定を含めましたか? Djangoは、あなたのURLconfのいずれかにnotification_noticesを見つけることができないように見える...

https://github.com/pinax/django-notification/blob/master/notification/urls.py

あなたのサイトのurls.pyにこれらを参照する必要があり、例えば:

urlpatterns = patterns('', 
    (r'^notification/', include(notification.urls)), 
... 
1

あなたは作成する必要があります

(r'^notifications/', include('notification.urls')), 

MO用Django docsを参照してください:django-nofication urls.py fileなど、あなたのurls.pyファイルのエントリ他のurls.pyファイルを含む情報。

関連する問題