Ask Your Question
2

How to update Django 1.3 messaging to new messaging framework of Django 1.4?

asked 2012-07-26 03:58:38 -0500

kluo gravatar image

updated 2012-07-26 13:07:25 -0500

Hi, I'm trying to get askbot working with Django 1.4 and am having some issue with the deprecated user.message_set.create() method, which is what is used for notifying a user when they have been awarded a badge. To update this to the new Django 1.4 messaging framework, you would need to use messages.success(request, msg). However this is called within notify_award_message which is called after saving an Award instance, so there is no reference to request. Any ideas how to get this, and any other areas in askbot code using the old messaging method, working?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-26 04:12:53 -0500

Evgeny gravatar image

updated 2012-07-26 04:14:53 -0500

I think that we'll have to create a clone of the old messaging framework, because we need persistent messages, even when other apps might be ok with session or cookie-based messages.

Also - as you've rightly noticed - we need to set messages even without access to the request object.

Seems like the django's new messaging API won't work for us.

edit flag offensive delete link more

Comments

https://github.com/philomat/django-persistent-messages looks like a good possible option here

kluo gravatar imagekluo ( 2012-07-26 13:34:55 -0500 )edit

Hi, roughly when do you think askbot will have support for Django 1.4?

kluo gravatar imagekluo ( 2012-07-30 05:07:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-26 03:58:38 -0500

Seen: 153 times

Last updated: Jul 26 '12