I have a webapp that is accessed by the following urls (among others):

example.com/foobar-page-23
example.com/preferences
example.com/barfoo

etc.

When these URL's are access, the page is displayed using data from the
user who is logged in via request.user.

I also want it so the user can link others via:

example.com/share-34-gHy6GdY/foobar-page-23
example.com/share-34-gHy6GdY/barfoo

where 34 is the user_id and the stuff after the dash is just 34 ran
through a sha1-type hash to provide some simple security. This page
will display data as if request.user is user #34, except of course
request.user.is_authenticated() will return false, and the widgets for
changing data will be hidden in the template, and the navigation links
will not display "preferences" and the link.

I'm just wondering whats the best way to go about this? Am I going to
have to write code into each view that substitutes request.user with
User(pk=34), or should I make a separate view for the sharing
functionality that passes a modified 'request' object to the other
view? How would 'yall django experts go about attacking this one?
--~--~---------~--~----~------------~-------~--~----~
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