On Aug 21, 2009, at 9:54 AM, MIL wrote:

> this works fine but I dont want to repeat it in all my views:
> def my_profile(request):
>       gotta_go_through = request.user.get_profile
> ().gotta_go_through_this_url()
>       if gotta_go_through and gotta_go_through != request.path:
>               return HttpResponseRedirect(gotta_go_through)
>       ...........
> Or  maybe you can give me a better solution for this.

Take a look at middleware. Specifically, process_request():

http://docs.djangoproject.com/en/dev/topics/http/middleware/#process-request


-- dz

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

Reply via email to