Thanks krzysiekpl, I actually have to use mysql. Having browsed
through the django source, I don't think there is anyway to intercept
the query unless it were done for example in mysqldb, since the
library actually generates the raw sql. I've discovered the
general_log to table feature of mysql 5.1 and am just executing a
query against that to filter the results.

On Mar 9, 4:35 am, krzysiekpl <krzysie...@gmail.com> wrote:
> Hi, if you are using postgresql you can use logger_collector. Try
> this:http://www.postgresql.org/docs/8.3/static/runtime-config-logging.html.
>
> On 9 Mar, 05:04, Dave Sluder <daveslu...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I need to log all insert/update/delete queries such that the database
> > could be rebuilt from the log. I know I can do this at the database
> > level, but I need to log selectively for certain models.
> > The statements captured from db.connection.queries still contain
> > parameters so they won't work.
>
> > Does anyone have any insight as to where I can intercept the raw query
> > if at all?

-- 
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 
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