Home Ask Login Register

Developers Planet

Your answer is one click away!

Juan Carlos Asuncion February 2016

Django-admin-notifications error

I would like to request assistance in this matter, I am using grappelli for my admin and I am trying to include an admin notification module via Django-admin-notifications, I have followed every steps in the basic usage and I am getting an error that says:

TemplateSyntaxError at /admin/ notification_tag' is not a valid tag library: Template library notification_tag not found

I am getting errors from {% load notification_tag %}.

I have followed the directions strictly(added admin_notifications in installed apps, imported admin_notifications in urls with admin_notifications.autodiscover()), What am i doing wrong?

Here's what it looks like(index.html of grappelli)

{% load notifications_tag %}
{% extends "admin/base_site.html" %}

<!-- LOADING -->
{% load i18n grp_tags log %}

{% block javascripts %}
    {{ block.super }}
{% endblock %}

{% error_notifications %}

{% block bodyclass %}dashboard{% endblock %}
{% block content-class %}content-grid{% endblock %}



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"


Python 2.7, django 1.8.2


doru February 2016

In your template you are trying to load notifications_tag:

{% load notifications_tag %}

or the name of the template tag file is notification_tag. So, you should write

{% load notification_tag %}

whitout s.

Post Status

Asked in February 2016
Viewed 3,436 times
Voted 11
Answered 1 times


Leave an answer

Quote of the day: live life