我想在這個問題上請求援助,我使用格拉佩利我聯繫,我想包括通過Django-admin-notifications管理通知模塊,我遵循的基本用法,我每一步我得到一個錯誤,指出:Django的管理的通知錯誤
TemplateSyntaxError at /admin/ notification_tag' is not a valid tag library: Template library notification_tag not found
我得到的錯誤從{% load notification_tag %}
。
我嚴格遵循了指示(在已安裝的應用中添加了admin_notifications
,在url中添加了admin_notifications
與admin_notifications.autodiscover()
),我做錯了什麼?
這裏是什麼樣子
{% load notifications_tag %}
{% extends "admin/base_site.html" %}
<!-- LOADING -->
{% load i18n grp_tags log %}
<!-- JAVASCRIPTS -->
{% block javascripts %}
{{ block.super }}
{% endblock %}
{% error_notifications %}
<!-- COLTYPE/BODYCLASS-- >
{% block bodyclass %}dashboard{% endblock %}
{% block content-class %}content-grid{% endblock %}
<!-- BREADCRUMBS -->
....
notifications.py(index.html的格拉佩利的):
import admin_notifications
from .models import boom
def notification():
items = boom.objects.all()
a = len(items)
if a:
return "You have " + str(a) + " items in models"
admin_notifications.register(notification)
的Python 2.7,Django的1.8.2
你能告訴我你的'notification.py'文件是怎麼樣的嗎? – doru