Skip to content

Commit

Permalink
Merge pull request #2873 from ger-benjamin/no_redirect
Browse files Browse the repository at this point in the history
No redirect on switch to desktop app from mobile
  • Loading branch information
ger-benjamin authored Mar 21, 2017
2 parents 7849840 + 5fa2deb commit d598d15
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 d598d15

Please sign in to comment.