On Nov 20, 2007, at 11:05 AM, Justin wrote:

>
> Sorry, I got cut off.. Anyway, the order is as follows:
>
> 1. <my test controller>
> 2. template.TemplateController
> 3. template.TemplateController
> 4. error.ErrorController
> 5. template.TemplateController
> 6. error.ErrorController
> 7. error.ErrorController
>
> This is for a test view that just returns a simple string to the
> browser and the page is returned as is should be without error. Is
> this normal? What is the purpose of all these controller calls? Right
> now I'm just evaluating pylons but this strikes me as inefficient and
> obtuse.

Pylons is going to construct a Controller and call the specified  
action once per request. If that controller returns an error HTTP  
response code, Pylons will route the request to the error page (so  
you get a pretty 404 or whatever page). Triggering the error page  
means construction of an ErrorController and a call to its error page  
action.

Assuming you're using the default TemplateController and its  
accompanying catch-all route, this means your browser is actually  
hitting TemplateController 3 times. The default TemplateController  
simply abort()s, hence the ErrorControllers.

One of the requests is most likely for the favicon, I don't know  
about the other one (it probably has to do with the rendered error  
page). You can see what URL path was requested by printing out  
request.path_info.

--
Philip Jenvey



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
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