couldn't we do something similar to get_active_site() call on the sites table?

that way people who need the 'request' object could just call it and
it wouldn't impact the api of anything else?

On 11/18/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 11/17/05, plisk <[EMAIL PROTECTED]> wrote:
> > Seems like its not possible to access request object in hooks like
> > pre_save and display methods(those are listed in list_display) ? Is it
> > supposed to be like this by design ? If so then hardly its very
> > convinient to use in real applications.
>
> Yes, this is by design. Models have no knowledge of whether they're
> being used in a Web context, or in a shell script, or in a desktop GUI
> app. Coupling models to Web requests would be convenient in some cases
> but a bad design decision overall.
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com | chicagocrime.org
>


--
[EMAIL PROTECTED] -- ++61-3-9877-0909
If everything seems under control, you're not going fast enough. -
Mario Andretti

Reply via email to