Hi,
In my project, I need to handle links like this:
http://togo-wap/wapad.php?lng=en&aff_id=11
>From this link, I just need to get the query string (?
lng=en&aff_id=11).
I'm trying to get it through the following code:
from werkzeug.routing import BaseConverter
class LikePHPConverter(BaseConverter):
def __init__(self, url_map):
super(LikePHPConverter, self).__init__(url_map)
self.regex = r'(\?[a-z+&\$_.-][a-z0-9;:@&%=+\/\$_.-]*)?'
app.url_map.converters['like_php']=LikePHPConverter
@app.route(u'/wapad.php<like_php:query>')
def wapad (query = None):
print query
Everything works and the page is loaded, but to get the query string
after wapad.php can not - return None. I understand the problem in my
regex.
Tell me, how do I correctly write, so I can get ?lng=en&aff_id=11 in
view function?
Regards,
Vasillii
PS: Sorry for my English.
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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/pocoo-libs?hl=en.