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

Access URL Parameters in WizardView Templates #238

Open
DanielAlderman opened this issue May 4, 2023 · 0 comments
Open

Access URL Parameters in WizardView Templates #238

DanielAlderman opened this issue May 4, 2023 · 0 comments

Comments

@DanielAlderman
Copy link

Hi there,

I was wondering what is the recommended way of passing URL Parameters into the template of a WizardView?

This is done automatically in templates of generic Django views such as a ListView, I am able to use URL Parameters simply by using the name of the capture parameter.

For example if my URL is defined as path('<location>/', views.CustomerIndexView.as_view(), name='customer_index'),

Then I can access that captured value simply using {{ location }} in my template.

This does not work in the template of a WizardView or one of its descendants. Looking at the kwargs of the view I can see that the captured value is present, but it isn't passed as context to the template, is this by design?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant