Code

Opened 2 years ago

Closed 2 years ago

#17150 closed Cleanup/optimization (fixed)

NamedUrlWizardView should add 'url_name' to wizard object in template context

Reported by: Bradley Ayers <bradley.ayers@…> Owned by: nobody
Component: contrib.formtools Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Currently there's no way to access the URL name used to create 'step' URLs with the NamedUrlWizardView. I propose that NamedUrlWizardView should implement get_context_data, and add 'url_name' to the 'wizard' dict.

Attachments (1)

trac-17150.diff (1.6 KB) - added by steph 2 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 2 years ago by julien

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 2 years ago by jezdez

Yeah, sounds reasonable.

Changed 2 years ago by steph

comment:3 Changed 2 years ago by steph

I added a patch with extended template context for namedurlwizardview. I think this is ready for checkin.

comment:4 Changed 2 years ago by julien

  • Needs tests set

That looks pretty good. Could you please also add a test for this?

comment:5 Changed 2 years ago by julien

  • Needs tests unset

Sorry, I missed the fact there was already a test ;)

comment:6 Changed 2 years ago by julien

  • Resolution set to fixed
  • Status changed from new to closed

In [17232]:

Fixed #17150 -- Made NamedUrlWizardView.url_name available in the template context. Thanks to Bradley Ayers for the suggestion and to Stephan Jaekel for the patch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.