routes not setting request.vars

37 views
Skip to first unread message

Manoj Sonawane

unread,
May 15, 2014, 9:02:32 PM5/15/14
to web...@googlegroups.com
Hello,
Following is my main routes.py

logging = 'debug'
default_application = "myshop"
routes_app = ((r'/(?P<app>welcome|admin|app)\b.*', r'\g<app>'),
               (r'(.*)', r'myshop'),
               (r'/?(.*)', r'myshop')\
              )

followed by myshop/routes.py
# -*- coding: utf-8 -*-
default_controller = 'default'  # ordinarily set in app-specific routes.py
default_function = 'index'      # ordinarily set in app-specific routes.py

routes_in = (
('/', '/myshop/default/index'),
# ('/static/(?P<path>.*)', '/myshop/static/\g<path>'),
('/$language/$anything','/myshop/default/index?lang=$language'),
)

routes_out = (
('/static/$anything','/app/static/$anything'),
('/default/$anything?lang=$language',r'/app/$language/$anything')
)

this should set a request.var but it is not. any pointers ?

Thanks

Manoj Sonawane

unread,
May 16, 2014, 9:56:19 PM5/16/14
to web...@googlegroups.com
bumping. if anyone can show way it will be great

Massimo Di Pierro

unread,
May 16, 2014, 11:13:32 PM5/16/14
to web...@googlegroups.com
I cannot reproduce it.
try this simple routes.py

routes_in = (
    ('/$language/$anything','/$anything?lang=$language'),
)

then visit:


the ?lang=en is in there.
Reply all
Reply to author
Forward
0 new messages