This gets ugglier at each step, think twice before doing this.
Django uses thread storage for django.db.connection, so what seems a simple
object is unique to the request and safe. The quick and dirty way is to
place a middleware after auth, and set something in django.db.connection.

PD: django.db.connection is the name I recall from memory. May be
django.models.db.connection or django.core.db.connection or ... etc

On Tue, Jun 23, 2009 at 3:42 PM, ReneMarxis <[email protected]> wrote:

>
> Hey Matias.
>
> Many thanks for your answer. This is what my 'new' manage.py looks
> like:
>
> http://dpaste.com/58713/
>
> and it seems to work. At least no data is saved any longer :)
>
> But next question is not far away:
> I can use pass or return forig(self) according to if i'd like to save
> or not (is this ok at all?), but how can i check session data. There
> is no request/response loop right?
>
> PS: Monkey patching... very nice this :)
>
> On 23 Jun., 13:38, Matías Costa <[email protected]> wrote:
> > Monkey patch django.db.model.save
> > Where? in manage.py?
> >
> > On Tue, Jun 23, 2009 at 12:56 PM, ReneMarxis <[email protected]>
> wrote:
> >
> > > what i forgot to say: Of course i don't like to change all models-
> > > code. Some 'global' solution is what i am looking for.
> >
>

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

Reply via email to