I am trying to use django-notification in an application but I am
having some problems with it creating notice types. In fact the
notification types are for the django-messages application but the
management.py file looks correct:

from django.dispatch import dispatcher
from django.db.models import get_models, signals

from django.utils.translation import ugettext_noop as _

try:
    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)
        notification.create_notice_type("messages_sent", _("Message
Sent"), _("you have sent a message"), default=1)
        notification.create_notice_type("messages_replied", _("Message
Replied"), _("you have replied to a message"), default=1)
        notification.create_notice_type("messages_reply_received",
_("Reply Received"), _("you have received a reply to a message"),
default=2)
        notification.create_notice_type("messages_deleted", _("Message
Deleted"), _("you have deleted a message"), default=1)
        notification.create_notice_type("messages_recovered",
_("Message Recovered"), _("you have undelete a message"), default=2)

    dispatcher.connect(create_notice_types,
signal=signals.post_syncdb, sender=notification)
except ImportError:
    print "Skipping creation of NoticeTypes as notification app not
found"

I have the notifications application first in my settings.py file but
everytime I try and send a notification I get "NoticeType matching
query does not exist."

There is nothing in the NoticeType database, and so I am concluding
that noticetypes are not being entered into the database but I am
finding it hard to know why this is the case..

Any clues?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to