Currently the accept= routing is scheduled for a redesign. It technically works but is nondeterministic when two content types of equal quality are defined. For example, your default view with no accept= will only occur on requests that do not accept */*, otherwise either text/plain or application/json will get accepted instead. And all browsers send */* as one of their accepts. Also even when doing an XHR request, unless you override the accept header of the request, the browser usually prefers text/html.
We are interested in improving the design to allow for server-defined priority/preferences (this is supported by webob but not by pyramid's api) to improve the determinism but in general accept headers do not seem well understood/implemented on the web. See https://github.com/Pylons/pyramid/issues/1264 if you're interested in learning more or wanting to help as no interested party has really taken up the reigns other than to complain about it at this point. :-) On Sun, Oct 25, 2015 at 12:20 PM, Jonathan Vanasco <[email protected]> wrote: > > The default needs to appear last in the routing configuration, that is > what is followed in-order. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
