On Apr 3, 6:59 pm, "Mike Orr" <[EMAIL PROTECTED]> wrote:

> What does section 2.1.1 of the Routes manual mean?  Is this only for
> external URLs or for all static routes?

It's for any static route that you want to have an alias but don't
need to match requested URLs.

> Why does the _static argument
> have a leading underscore?

I don't know.  Perhaps to avoid confusion/conflict with the use of
'static' as a query string variable name.

> I have several routes which point to things in my public directory.
> Obviously no request will come in for them because they're handled by
> the static middleware.  But I defined routes anyway so I can use
> url_for in templates.
>
> ...
>
> Should these have the _static argument?

Some of them could, yes.  It won't do dynamic matching if you set
_static=True.  Keyword parameters to url_for() will be added to the
query string of the static URL.  See the example in 4.1 Named Routes.
If you need dynamic parts, I guess you'll have to leave off
_static=True and keep them at the end so they never match.

--
Ron


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