Skip to content

Commit bbb200b

Browse files
authored
Profile: redirect to /accounts/edit/ view on successful edit (#10610)
Closes #10404
1 parent c28e39a commit bbb200b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

readthedocs/profiles/views.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ def get_object(self):
6161

6262
def get_success_url(self):
6363
return reverse(
64-
'profiles_profile_detail',
65-
kwargs={'username': self.request.user.username},
64+
"profiles_profile_edit",
6665
)
6766

6867

readthedocs/rtd_tests/tests/test_profile_views.py

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_edit_profile(self):
3636
},
3737
)
3838
self.assertTrue(resp.status_code, 200)
39+
self.assertEqual(resp["Location"], "/accounts/edit/")
3940

4041
self.user.refresh_from_db()
4142
self.user.profile.refresh_from_db()

0 commit comments

Comments
 (0)