Dashboard > Labels > controllers-faq
  Labels Log In | Sign Up   View a printable version of the current page.  
  Label: controllers-faq

All content with label controllers-faq.

How do I get full path of the current url, including any query parameters? (Pylons FAQ)
Q: How do I get full path of the current url, including any query parameters? A: Use constructurl function from paste.request http://pythonpaste.org/modulepaste.request.html. OR If you are only concerned with the url and not the protocol://host:port , you can ...
Streaming Content to the Browser (Pylons FAQ)
Question How do I stream content to the browser? Answer First, turn off debug mode in your ini file, or copy your development.ini file and uncomment the line: #set debug = false When debug mode is on, streaming can't ...
How do I make all actions in a controller require a user to be authenticated? (Authkit) (Pylons FAQ)
Question How do I make all actions in a controller require a user to be authenticated? (Authkit) Answer At the end of your controller add this line: MyController = authkit.authorize.middleware(MyController(), authkit.permissions.RemoteUser()) If the user is not logged in yet then calling any action in this controller will make ...
How do I get at the raw body of an HTTP POST? (Pylons FAQ)
Question How do I get at the raw body of an HTTP POST? I can't use {{request.POST}} because my HTTP POST wasn't submitted by a form. Answer The {{request.POST}} method provides convenient, dictlike access to the params of an ...
Why do redirect_to and abort raise exceptions, instead of returning a Response? (Pylons FAQ)
Redirects and aborts are typically operations that should occur immediately, preventing anything else from executing in your controller's calling functions. Thus the redirectto and abort functions raise exceptions (of base class paste.httpexceptions.HTTPException). These exceptions are caught by the httpexceptions middleware towards ...
Site running on a free Atlassian Confluence Open Source Project License granted to Pylons. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.3.3 Build:#645 Feb 13, 2007) - Bug/feature request - Contact Administrators