Commits

offline  committed d7b3897

html type bugfix

  • Participants
  • Parent commits 1200d16

Comments (0)

Files changed (2)

File notify/__init__.py

 from django.shortcuts import redirect
+from django.template import RequestContext
 
 import notify
 from notify import settings
 
 
-
 class Adapter(object):
     def __init__(self, priority):
         self.priority = priority
 
-
     def __call__(self, request=None, _redirect=None, message=None):
         if notify.settings.NOTIFY_TYPE == "flashcookie":
             request.flash[self.priority] = message
             return redirect(_redirect)
         
         if notify.settings.NOTIFY_TYPE == "html":
-            return {'TEMPLATE': 'notify/message.html', 'message': message}
-
+            return render_to_response('notify/message.html', {'message': message}, context_instance=RequestContext(request))
 
 
 class Notify(object):
-
     def __getattr__(self, name):
         return Adapter(name)
 
-
-notify_user = Notify()
+notify_user = Notify()

File notify/settings.py

-
-
 NOTIFY_TYPE = "html"
-
-NOTIFY_TYPES = ("flashcookie",)