I use web2py with GAE.

This is a snippet of my index.html
    <head>
        <meta http-equiv="content-type" content="text/html;
charset=UTF-8" />
        <link rel="stylesheet" href="lyc/static/css/reset.css" />
        <link rel="stylesheet" href="lyc/static/css/style.css" />
        <!--[if IE]>
        <link href="lyc/static/css/ie_style.css" rel="stylesheet"
type="text/css">
        <![endif]-->
        <link rel="stylesheet" href="lyc/static/css/track.css" />
        <link rel="stylesheet" href="lyc/static/css/article.css" />
        <title>{{ =response.title }}</title>
    </head>


When I don't use a routes.py I have got a page but without pics and
css marking. My URL in this case is localhost:8080/lyc/default/index/
news.

I try use the routes.py with next instructions
    routes_in = (
            (r'/(?P<tbl>news|speciality)', r'/lyc/default/index/
\g<tbl>'),
            (r'/(?P<tbl>history|contacts|credits)', r'/lyc/default/
show/\g<tbl>'),)

    routes_out = (
            (r'/lyc/default/index/\g<tbl>', r'/(?P<tbl>news|
speciality)'),
            (r'/lyc/default/show/\g<tbl>', r'/(?P<tbl>history|contacts|
credits)'),)

My URL in this case is localhost:8080/news. All pics shown and css
applied.


I've little modified my routes.py to the next view
    routes_in = (
            (r'/(?P<tbl>news|speciality)', r'/lyc/default/index/
\g<tbl>'),
            (r'/(?P<tbl>history|contacts|credits)', r'/lyc/default/
show/\g<tbl>'),
            (r'/(?P<tbl>news|speciality)/(?P<id>\d+)', r'/lyc/default/
show/\g<tbl>/\g<id>'),)

    routes_out = (
            (r'/lyc/default/index/\g<tbl>', r'/(?P<tbl>news|
speciality)'),
            (r'/lyc/default/show/\g<tbl>', r'/(?P<tbl>history|contacts|
credits)'),
            (r'/lyc/default/show/\g<tbl>/\g<id>', r'/(?P<tbl>news|
speciality)/(?P<id>\d+))'),)

When my URL is localhost:8080/news or localhost:8080/credits etc.  all
OK, but when URL is localhost:8080/news/97 for example I've got
expected page without any pics and css.



Reply via email to