Fix rendering of the OAuth application client secret widget.

Review Request #12466 — Created July 12, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This change mirrors a similar one to
django.forms.widgets.CopyableInputWidget. A change in Django's form
rendering meant that calling the TextInput superclass' render() method
was still using self.template_name, which would end up rendering two
copies of the template, one of which was broken. This change makes it so
we explicitly render the text input template for that part of the
display.

  • Loaded the OAuth application edit form. Saw that the client secret
    widget displayed correctly, and that the "Regenerate client secret"
    button worked correctly.
  • Ran unit tests on all supported versions of Python.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Fix rendering of the OAuth application client secret widget.
This change mirrors a similar one to `django.forms.widgets.CopyableInputWidget`. A change in Django's form rendering meant that calling the TextInput superclass' `render()` method was still using `self.template_name`, which would end up rendering two copies of the template, one of which was broken. This change makes it so we explicitly render the text input template for that part of the display. Testing Done: Loaded the OAuth application edit form. Saw that the client secret widget displayed correctly, and that the "Regenerate client secret" button worked correctly.
34848d5a6e82e7fb4388a00ab5572d5bf792dbff David Trowbridge
reviewboard/oauth/widgets.py
Loading...