Skip to content

Commit

Permalink
No redirect on switch to desktop app from mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
ger-benjamin committed Mar 21, 2017
1 parent 9b1140e commit 5fa2deb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions c2cgeoportal/scripts/import_ngeo_apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,22 @@ def main():

if args.html:
if args.interface == "mobile":
data = _sub(
r"</head>",
"""</head>
<%
request_get_no_redirect = request.GET
request_get_no_redirect['no_redirect'] = u''
%>
""",
data,
)
data = _sub(
re.escape(
r"http://camptocamp.github.io/ngeo/master/"
r"examples/contribs/gmf/apps/desktop/"
r"examples/contribs/gmf/apps/desktop/?no_redirect"
),
"${request.route_url('desktop', _query=dict(request.GET)) | n}",
"${request.route_url('desktop', _query=dict(request_get_no_redirect)) | n}",
data,
)
if args.interface == "desktop":
Expand Down

0 comments on commit 5fa2deb

Please sign in to comment.