On Wed, Mar 24, 2010 at 5:01 AM, jrs <j...@framemedia.com> wrote:
> Thanks Preston.
>
> I'm not using django's messaging... at all.  My problem is that for
> every ajax request, the query-
>
> {'time': '0.000', 'sql': u'SELECT `auth_message`.`id`,
> `auth_message`.`user_id`, `auth_message`.`message` FROM `auth_message`
> WHERE `auth_message`.`user_id` = 1 '}
>
> is being run.  I can't figure out how I can stop this unnecessary
> database activity.

It depends on what version of Django you are using?

If you're using 1.1.1 or earlier, there's not much you can do. The
problem you describe is caused by the auth context processor, which is
required by tools such as admin.

If you're using 1.1.X (the latest code on the 1.1.X branch), this
problem has been fixed; messages has been made lazy, so you won't
incur the database hit unless you specifically request the messages
attribute.

If you're using trunk (which will soon become 1.2), the problem has
completely changed - messaging is now a configurable activity, so you
can choose to completely disable messages (although admin will no
longer work), or you can opt to use a non-database store for messages.
You could even write a 'dummy' store for messages that implements the
messaging interface, but does nothing with those messages.

Yours,
Russ Magee %-)

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

Reply via email to