Hi,

these views are protected by @login_required view, right?

If so, users that are not logged in should be redirected to the login view.

If you are not using the decorator, how are you handling users that are not 
logged in these different views? You are probably doing something against the 
DRY principle.

bye
Ivo

On Nov 15, 2011, at 17:16 , CrabbyPete wrote:

> I have a site with lots of views. When someone comes to my site and is
> not logged in I direct them to the homepage to login. However a user
> could type in a whole url for a view and it will go there and cause an
> error because the view expects the user to be logged in. I could put
> logic in every view to see if the user is logged in but it seems
> redundant. Is there a way to force anonymous users to the home even if
> they type in a full url to a specific view
> 
> -- 
> 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.
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to