summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-07-07Merge pull request #1 from mmerickel/feature.mountAtsushi Odagiri
Refactored the subapp mounting into config.include()
2011-07-05gardenMichael Merickel
2011-07-05Refactored the mount code into config.include.Michael Merickel
2011-07-05use route_prefix rather than existing route.Atsushi Odagiri
2011-07-05gardenAtsushi Odagiri
2011-07-05mount subapplication with route_prefixAtsushi Odagiri
2011-07-05sign to contributorsAtsushi Odagiri
2011-07-05mount subapplicationAtsushi Odagiri
2011-07-04Merge pull request #223 from michr/masterCarlos de la Guardia
fixed wording for add_view to sound a bit more proper
2011-07-04better working for renderer param of add_viewMichr
2011-07-04- New request attribute: ``json``. If the request's ``content_type`` isChris McDonough
``application/json``, this attribute will contain the JSON-decoded variant of the request body. If the request's ``content_type`` is not ``application/json``, this attribute will be ``None``.
2011-07-04- A new value ``http_cache`` can be used as a view configurationChris McDonough
parameter. When you supply an ``http_cache`` value to a view configuration, the ``Expires`` and ``Cache-Control`` headers of a response generated by the associated view callable are modified. The value for ``http_cache`` may be one of the following: - A nonzero integer. If it's a nonzero integer, it's treated as a number of seconds. This number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=3600`` instructs the requesting browser to 'cache this response for an hour, please'. - A ``datetime.timedelta`` instance. If it's a ``datetime.timedelta`` instance, it will be converted into a number of seconds, and that number of seconds will be used to compute the ``Expires`` header and the ``Cache-Control: max-age`` parameter of responses to requests which call this view. For example: ``http_cache=datetime.timedelta(days=1)`` instructs the requesting browser to 'cache this response for a day, please'. - Zero (``0``). If the value is zero, the ``Cache-Control`` and ``Expires`` headers present in all responses from this view will be composed such that client browser cache (and any intermediate caches) are instructed to never cache the response. - A two-tuple. If it's a two tuple (e.g. ``http_cache=(1, {'public':True})``), the first value in the tuple may be a nonzero integer or a ``datetime.timedelta`` instance; in either case this value will be used as the number of seconds to cache the response. The second value in the tuple must be a dictionary. The values present in the dictionary will be used as input to the ``Cache-Control`` response header. For example: ``http_cache=(3600, {'public':True})`` means 'cache for an hour, and add ``public`` to the Cache-Control header of the response'. All keys and values supported by the ``webob.cachecontrol.CacheControl`` interface may be added to the dictionary. Supplying ``{'public':True}`` is equivalent to calling ``response.cache_control.public = True``. Providing a non-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value)`` within your view's body. Providing a two-tuple value as ``http_cache`` is equivalent to calling ``response.cache_expires(value[0], **value[1])`` within your view's body. If you wish to avoid influencing, the ``Expires`` header, and instead wish to only influence ``Cache-Control`` headers, pass a tuple as ``http_cache`` with the first element of ``None``, e.g.: ``(None, {'public':True})``.
2011-07-04gardenChris McDonough
2011-07-02remove male pronounChris McDonough
2011-07-02intentChris McDonough
2011-07-02reorderChris McDonough
2011-07-03gardenAtsushi Odagiri
2011-07-03use with includemeAtsushi Odagiri
2011-07-03add testAtsushi Odagiri
2011-07-03add_route with root_routeAtsushi Odagiri
2011-07-02sign to contributorsAtsushi Odagiri
2011-07-02mount subapplicationAtsushi Odagiri
2011-07-01move 1.0 stuff to HISTORY.txtChris McDonough
2011-07-01prep for 1.1a4Chris McDonough
2011-07-01fixChris McDonough
2011-07-01- The ``pyramid.events.subscriber`` directive behaved contrary to theChris McDonough
documentation when passed more than one interface object to its constructor. For example, when the following listener was registered:: @subscriber(IFoo, IBar) def expects_ifoo_events_and_ibar_events(event): print event The Events chapter docs claimed that the listener would be registered and listening for both ``IFoo`` and ``IBar`` events. Instead, it registered an "object event" subscriber which would only be called if an IObjectEvent was emitted where the object interface was ``IFoo`` and the event interface was ``IBar``. The behavior now matches the documentation. If you were relying on the buggy behavior of the 1.0 ``subscriber`` directive in order to register an object event subscriber, you must now pass a sequence to indicate you'd like to register a subscriber for an object event. e.g.: @subscriber([IFoo, IBar]) def expects_object_event(object, event): print object, event
2011-07-01fix wiki tests tooChris McDonough
2011-07-01run setup.py developChris McDonough
2011-07-01use assertEqualChris McDonough
2011-07-01- The Wiki2 tutorial "Tests" chapter had two bugs: it did not tell the userChris McDonough
to depend on WebTest, and 2 tests failed as the result of changes to Pyramid itself. These issues have been fixed.
2011-07-01gardenChris McDonough
2011-07-01- Deprecated the ``set_renderer_globals_factory`` method of the ConfiguratorChris McDonough
and the ``renderer_globals`` Configurator constructor parameter.
2011-07-01typoChris McDonough
2011-07-01Merge branch 'master' of github.com:Pylons/pyramidChris McDonough
2011-07-01Add JSONP rendererChris McDonough
2011-06-30Merge pull request #221 from niallo/patch-1Carlos de la Guardia
Zap word "either" describing acceptable values to Configurator.add_view() "request_method" kwarg.
2011-06-30Zap word "either" describing request_method. By my reading, the word ↵Niall O'Higgins
"either" implies there is an alternative to one of the listed strings (perhaps that you can pass some other kind of value such as a sequence of allowed request methods - which is not the case).
2011-06-30gardenChris McDonough
2011-06-30gardenChris McDonough
2011-06-28unused importChris McDonough
2011-06-26- ``pyramid.testing.DummyRequest`` now raises deprecation warnings whenChris McDonough
attributes deprecated for ``pyramid.request.Request`` are accessed (like ``response_content_type``). This is for the benefit of folks running unit tests which use DummyRequest instead of a "real" request, so they know things are deprecated without necessarily needing a functional test suite.
2011-06-26Merge branch 'master' of github.com:Pylons/pyramidChris McDonough
2011-06-26added github url option in docs conf for ribbonBlaise Laflamme
2011-06-26prep for 1.1a3Chris McDonough
2011-06-26- Added ``mako.preprocessor`` config file parameter; allows for a MakoChris McDonough
preprocessor to be specified as a Python callable or Python dotted name. See https://github.com/Pylons/pyramid/pull/183 for rationale. Closes #183.
2011-06-26try to replicate github #213Chris McDonough
2011-06-26- Accessing or setting deprecated response_* attrs on requestChris McDonough
(e.g. ``response_content_type``) now issues a deprecation warning at access time rather than at rendering time.
2011-06-26appeasementChris McDonough
2011-06-23gardenChris McDonough
2011-06-23coverageChris McDonough