That will improve the situation a lot, thanks! It doesn't change the fact
that it would feel more correct to have it in an authentication backend :)

On Mon, Apr 26, 2010 at 5:40 PM, Joe <[email protected]> wrote:

>
> On Apr 26, 5:42 am, Martin Lundberg <[email protected]> wrote:
> > I was told to create a middleware which I did but it feels wrong since
> > it is called on every request for everything. And if I add
> > authentication by Twitter and maybe Google, there will be even more
> > middleware that is called everytime.
> >
> > What is the best way to do this? The way Authentication backends works
> > sounds like the perfect fit.
>
> You can specify middleware on a per-view basis by using
> django.utils.decorators.decorator_from_middleware.
> See the snippet at http://www.djangosnippets.org/snippets/1498/ for an
> example using pyfacebook.
>
> --
> 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]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

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