Commit ddb85da
authored
Fix the new Django admin user edit form's password change button (#129)
* Fix the new Django admin user edit form's password change button
At some point in the recent past
(https://code.djangoproject.com/ticket/34977), Django changed the user
edit form away from showing a link to the password change page, into a
button. This relied on a call to `get_context()`, which this custom
password widget wasn't invoking.
* Wrap the hidden password in gettext
* Update the widget test to ensure the button is there
* Check for the admin password change view url in the test
This should work both for pre-5.0 and post-5.0 versions of Django.1 parent 1db8f2f commit ddb85da
2 files changed
+15
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
50 | 40 | | |
51 | 41 | | |
52 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
261 | 271 | | |
262 | 272 | | |
263 | 273 | | |
| |||
0 commit comments