Hello,

I have an application in which users can have sub_users. Within the app, a 
user can select a sub_user, at which point, all controls become targeted to 
that selected sub_user. For example, if I select sub_user 1 and then goto 
"settings/show_settings.html," I want the show_settings.html to show 
settings only for that sub_user 1. If I navigate to another page, I want 
the controller and function to again refer only to sub_user 1. I want it to 
stay like this until I explicitly navigate to another sub_user 2.

In the case of web2py's URL mapping scheme, I assume this would mean I 
would have to use 1 as the argument after every function in the URL. What's 
the best way to go about ensuring this? Is this even the best way?

I've looked around and I can't find any best-practice advice regarding this 
functionality for web2py. Interestingly enough, though, the admin app does 
exactly what I'm looking for. For example, if I goto appadmin and goto 
manage an app, I am first taken to:

http://127.0.0.1:8000/admin/default/design/myapp

Then, if I goto peek at a model file, I am taken to:

http://127.0.0.1:8000/admin/default/peek/myapp/models/db.py

I am obviously being directed to a different function in the default 
controller of the admin app, but how did the myapp argument stay constant 
throughout that navigation?

Thank you ahead of time for any help. We're starting to rewrite our stack 
at my company and web2py is proving immeasurably invaluable... allowing us 
to develop so refreshingly quickly and confidently. Thank you all for your 
work on this!

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to