Why can't I do the (simplified) following? 

class AuthController(BaseController):
        def login(self):
                #do stuff
                return render("/login.html")
                
        def bar(self):
                #'v' in request.params or self.login
                if 'v' not in request.params:
                        self.login
                print 'what am i doing here?'
                v = request.params['v'] #attribute error if I visit 
http://localhost/pylons/auth/bar/. Why doesn't it render login?

i.e. I'd like to transfer control to another method (self.login) from self.bar. 
I think I sort of understand whats happening (I get to 'what am I doing here?' 
when self.login returns, but shouldn't the render terminate things? Or is there 
a safe way to handle this? I seem to remember (don't laugh) ms asp had a 
request.transfer function or something that allowed you to terminate a request 
and transfer to another function. I find this a natural way to express things 
and would like to be able to do this without redirecting (i.e. no trip back to 
client).

Thoughts?

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.


Reply via email to