I am using decorators too, but just for admin dashboard.. I think maybe you can use handlers or hooks to solve your problem..
code may like this: app.add_processor(your_handler) app.add_processor(web.loadhook(your_hook)) death of ads Blog: http://shiao.org Twitter: @lepture On Thu, May 13, 2010 at 01:54, Oskar <[email protected]> wrote: > I think I'm gonna use decorators for access, that seems like a decent > solution. > > And about the templates: Oh, I can just use globals for header and > footer maybe? Didn't think of that first, although I have read the > docs :P > > Thank you for you frank answer. Even though I think I'm gonna stick > with webpy, I appreciate it. > > On May 12, 7:26 pm, Branko Vukelic <[email protected]> wrote: >> Frankly, I think Django might be better for you. It solves problems >> like this in a consisten manner, so you just have to look at the docs. >> In web.py, how you do these things is left mostly to the end-user. >> >> For Templetor's documentation, look here: >> >> http://webpy.org/docs/0.3/templetor >> >> >> >> On Wed, May 12, 2010 at 4:53 PM, Oskar <[email protected]> wrote: >> > And while we are at it; a related question. >> >> > If I want to send a template, like a header/menu thing, to all my >> > other templates, how can I do that so I don't have to do it in every >> > GET/POST? >> >> > On May 12, 4:47 pm, Oskar <[email protected]> wrote: >> >> To be clear; every user has his/her own password and username. >> >> >> On May 12, 4:42 pm, Oskar <[email protected]> wrote: >> >> >> > Hey! >> >> >> > I would like to require users to be logged in to access any page >> >> > (except one login page) on my site. But checking the session object in >> >> > every GET/POST function seems like the wrong way to do it. >> >> >> > Is there anyway I can put some code somewhere that gets executed no >> >> > matter what page the user visits? Ideally I would like to send them to >> >> > this one login page if they are not logged in. >> >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups "web.py" 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 >> >> > athttp://groups.google.com/group/webpy?hl=en. >> >> >> -- >> >> You received this message because you are subscribed to the Google Groups >> >> "web.py" 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 >> >> athttp://groups.google.com/group/webpy?hl=en. >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "web.py" 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 >> > athttp://groups.google.com/group/webpy?hl=en. >> >> -- >> Branko Vukelić >> >> [email protected] >> [email protected] >> >> Check out my blog:http://www.brankovukelic.com/ >> Check out my portfolio:http://www.flickr.com/photos/foxbunny/ >> Registered Linux user #438078 (http://counter.li.org/) >> I hang out on identi.ca:http://identi.ca/foxbunny >> >> -- >> You received this message because you are subscribed to the Google Groups >> "web.py" 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 >> athttp://groups.google.com/group/webpy?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "web.py" 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/webpy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en.
