File: urls.py

package info (click to toggle)
python-werkzeug 0.8.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,940 kB
  • sloc: python: 16,194; makefile: 143; pascal: 66; xml: 16
file content (11 lines) | stat: -rw-r--r-- 348 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
from werkzeug.routing import Map, Rule, Submount

map = Map([
    Rule('/', endpoint='#language_select'),
    Submount('/<string(length=2):lang_code>', [
        Rule('/', endpoint='index'),
        Rule('/about', endpoint='about'),
        Rule('/blog/', endpoint='blog/index'),
        Rule('/blog/<int:post_id>', endpoint='blog/show')
    ])
])