On Fri, Feb 11, 2011 at 06:20:23PM -0800, Iain Duncan wrote:
> 
> I want to have my Pyramid app look first for static html files when
> given a path like
> 
> /foo.html
> 
> I can make this happen by using the following static declaration, but
> that seems to hide other views as well:
> 
> <static
>   name=""
>   path="nf.static:html"
> />
> 
> [...]
> 
> Is there an easy way to accomplish this with static views that I'm
> missing?

Pyramid-sqla provides a way to do this.  See:

  
https://bytebucket.org/sluggo/pyramid_sqla/wiki/html/non_database_features.html#static-files

Behind the scenes, this adds a route with a "custom predicate"
which keeps the route from matching unless the static resource
exists:

  
http://docs.pylonsproject.org/projects/pyramid/dev/narr/urldispatch.html?highlight=custom_predicates#custom-route-predicates

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To post to this group, send email to pylons-devel@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to