Hi, How can I add query parameters to the current url in my view code?
I would like to add new parameters to current url if there are no parameters for example: http://127.0.0.1:6543/countries/list?sort=code I am using mako + url dispatch. @view_config(route_name=" countries_list", renderer="countries/list.html") def list(request): """countries list """ if request.GET.get("sort"): sort = request.GET.get("sort") else: # TODO: add new sort parameter in current url ? dbsession = DBSession() countries = dbsession.query(Country).order_by(sort) #TODO:how to return current url with new sort parameter ? return {"countries": countries} Thanks. Cem -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/ByF2QQn1D30J. 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.
