Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick up the URL variables at the start of the app #413

Open
thondeboer opened this issue May 8, 2024 · 5 comments
Open

pick up the URL variables at the start of the app #413

thondeboer opened this issue May 8, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request ship soon

Comments

@thondeboer
Copy link

I have an app that I want to be able to use URL variables, and I can figure out how to setup a handler when the values CHANGE, but how do I get the INITIAL settings of the URL values?
There is no equivalent state.get_route_vars() it seems so how do I get those values at startup?

@FabienArcellier
Copy link
Collaborator

Hi,

Did you try to use the session object with the http header referer ? You have access to the url at the origin of the call. You should be able to parse it with urlparse lib.

def handle_app_enter(state, session):
	print(session['headers'].get('referer'))

An event is missing to capture a user's entry into the application at the root level. You must necessarily use the one on the page wf-page-open.

We can imagine a wf-app-open event.

@thondeboer
Copy link
Author

thondeboer commented Jun 10, 2024 via email

@atzimot
Copy link

atzimot commented Jul 10, 2024

any news on this issue ?

@FabienArcellier
Copy link
Collaborator

We haven't planned the work on that yet.

@ramedina86
Copy link
Collaborator

We've revisited this and we've decided to move forward with a new event in Root that'll be able to get URL information.

@ramedina86 ramedina86 added the enhancement New feature or request label Aug 26, 2024
@FabienArcellier FabienArcellier changed the title Question: How do I pick up the URL variables at the start of the app? pick up the URL variables at the start of the app Aug 26, 2024
@FabienArcellier FabienArcellier added the wip Work in progress label Aug 26, 2024
@FabienArcellier FabienArcellier added ship soon wip Work in progress and removed wip Work in progress ship soon labels Sep 20, 2024
@FabienArcellier FabienArcellier added ship soon and removed wip Work in progress labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ship soon
Projects
None yet
Development

No branches or pull requests

4 participants