Thanks , Malcolm ,

I think your solution can resolve my problem.But does it a bit
complex ?
In fact , what I really want is a view function that will be called by
every view function.
i.e. , if I wrote an auth system , I need to authenticate whether the
user is logged in every view functions and pass some parameters to
every views function .

Any suggestions ?

On Dec 1, 11:49 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-30 at 19:41 -0800, David Shieh wrote:
>
> [...]
>
> > I have searched for some information . I know that middleware can do
> > this , but what I really want is just a small function for this .
>
> A process_request() function in middleware can be as small as you like.
> Middleware provides the hooks for functions that run before and/or after
> each view function. It's exactly what you're asking about and you
> haven't explained why they don't do what you want.
>
> Regards,
> Malcolm
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to