What does section 2.1.1 of the Routes manual mean?  Is this only for
external URLs or for all static routes?  Why does the _static argument
have a leading underscore?

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.  I had to put these routes after the Pylons
default mappings because one of them was getting matched too eagerly.

    # Static files (images & stylesheets)
    # These are used for generating URLs only, not for matching, so they
    # come after Pylons' default mappings.
    map.connect("stylesheet", "/default.css")
    map.connect("attachment", "/attachments/:orr_id/:entry_id/:filename",
        requirements={"orr_id": NUMERIC, "entry_id": NUMERIC})
    map.connect("incident_image", "/attachments/:orr_id/inews.jpg")
    map.connect("missing_incident_image", "/images/no_incident_image.jpg")
    map.connect("meatball", "/images/meatball.png")

Should these have the _static argument?

-- 
Mike Orr <[EMAIL PROTECTED]>

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