> 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?

all of that information is stored in the request object under:
request.registry.settings


> 2.       In Pylons, there is util containing forward, abort etc. Is there
> something similar in Pyramid?

from pyramid.httpexceptions import *
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.

-- 
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