Hi,
I have following queries on Pyramid:
1. In Pylons, there is a config API which could be used to read the fields in the .ini (development.ini or deployment.ini) file. Is there something similar in Pyramid?
2. In Pylons, there is util containing forward, abort etc. Is there something similar in Pyramid?
I am sorry to raise these queries without patiently going through the documentation.
But it would be really helpful if there was a way to directly locate the APIs I would be interested in J. The list of modules/APIs is there but I am not able to figure which contains what without going through all of them. J
Looking forward to your help…
Thanks,
Pinakee
![]()
P Please don't print this e-mail unless you really need to, this will preserve trees on planet earth.
----------------------------Disclaimer-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The information contained in this message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and permanently delete this message and any attachments from your system. Please note that e-mails are susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system.
-------------------------------------------------------------------------------------------------------------------------Disclaimer----------------------------------------------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-...@googlegroups.com.
To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
all of that information is stored in the request object under:
> 1. In Pylons, there is a config API which could be used to read the
> fields in the .ini (development.ini or deployment.ini) file. Is there
> something similar in Pyramid?
request.registry.settings
from pyramid.httpexceptions import *
> 2. In Pylons, there is util containing forward, abort etc. Is there
> something similar in Pyramid?
from pyramid.httpexceptions import HTTPFound , HTTPNotFound
http://docs.pylonsproject.org/projects/pyramid/en/1.0-branch/api/httpexceptions.html
you can read more about them here:
http://pyramid.readthedocs.org/en/latest/narr/views.html#http-exceptions
you can raise or return those objects from a view.
they behave slightly differently when you `raise` than `return`.
IIRC, if you `return` you still have the request object in
subscribers, but if you `raise`, then pyramid's exeception handling
system takes control and you no longer have the request.
Hi Mike and Jonathan,
Thanks for your prompt response.
Is there any corresponding API in Pyramid for the following?:
pylons.controllers.util.forward(wsgi_app)
Forward the request to a WSGI application. Returns its response.
return forward(FileApp('filename'))
Thanks,
Pinakee
P Please don't print this e-mail unless you really need to, this will preserve trees on planet earth.
----------------------------Disclaimer-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The information contained in this message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and permanently delete this message and any attachments from your system. Please note that e-mails are susceptible to change and malwares. VVIDIA COMMUNICATIONS PVT LTD. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system.
-------------------------------------------------------------------------------------------------------------------------Disclaimer----------------------------------------------------------------------------------------------------------
--
Hi Mike and Jonathan,
Thanks for your prompt response.
Is there any corresponding API in Pyramid for the following?:
pylons.controllers.util.forward(wsgi_app)
Forward the request to a WSGI application. Returns its response.
return forward(FileApp('filename'))
Hi Mike and Jonathan,
Thanks for your prompt response.
Is there any corresponding API in Pyramid for the following?:
pylons.controllers.util.forward(wsgi_app)
Forward the request to a WSGI application. Returns its response.
return forward(FileApp('filename'))