8000 Check if there are any query parameters in `baseurl` and adds it to `location.search` if possible by hoxbro · Pull Request #3214 · holoviz/panel · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Check if base url have any search parameters
  • Loading branch information
hoxbro committed Feb 26, 2022
commit f5cd6200ee4d85597f47caba6c00c5405794e9e9
14 changes: 10 additions & 4 deletions panel/io/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,18 @@ def headers(self):
def location(self):
if self.curdoc and self.curdoc not in self._locations:
from .location import Location
self._locations[self.curdoc] = loc = Location()
return loc
loc = self._locations[self.curdoc] = Location()
elif self.curdoc is None:
return self._location
loc = self._location
else:
return self._locations.get(self.curdoc) if self.curdoc else None
loc = self._locations.get(self.curdoc) if self.curdoc else None

try:
loc.search = self.base_url.replace("/", "")
except Exception:
pass

return loc

@property
def notifications(self):
Expand Down
0