Re: New messages API: regressions ?

2011-03-30 Thread Tobias McNulty
On Tue, Mar 29, 2011 at 11:08 AM, is_null  wrote:

> Greetings hackers,
>
> Django offered a feature to add messages to offline users, or to add
> messages to users in slots (if that's the pythonic name for "functions
> connected to signals"). It is still possible before 1.4, to call
> myuser.message_set.create() which doesn't need the request object.
>
> In 1.4, it will only be possible to add messages to online users and
> only in code which has the request object in its scope. That means:
>
> - no more adding messages to offline users
> - no more adding messages to users in slots
>
> A django hacker insisted that I should post on the list about this
> change, in case you were not aware about the consequences which might
> be seen as a regression.
>

Thanks for your message.  We are aware that this functionality is slated to
be removed.

It is not clear to me that the requirements for such functionality are
uniform across different applications.  It is my recommendation, at least,
that messages for users when the request object is not in scope are best
implemented in a 3rd party app.  If needed, integration with the
contrib.messages framework can be accomplished by implementing a custom
storage, similar to the following:

http://code.djangoproject.com/browser/django/trunk/django/contrib/messages/storage/user_messages.py

Cheers,
Tobias
-- 
Tobias McNulty, Managing Partner
Caktus Consulting Group, LLC
http://www.caktusgroup.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



New messages API: regressions ?

2011-03-29 Thread is_null
Greetings hackers,

Django offered a feature to add messages to offline users, or to add
messages to users in slots (if that's the pythonic name for "functions
connected to signals"). It is still possible before 1.4, to call
myuser.message_set.create() which doesn't need the request object.

In 1.4, it will only be possible to add messages to online users and
only in code which has the request object in its scope. That means:

- no more adding messages to offline users
- no more adding messages to users in slots

A django hacker insisted that I should post on the list about this
change, in case you were not aware about the consequences which might
be seen as a regression.

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.