forked from enviPath/enviPy
[Feature] Prediction settings list on User page (#276)
Some checks failed
Build CI Docker Image / build-and-push (push) Failing after 23s
Some checks failed
Build CI Docker Image / build-and-push (push) Failing after 23s
I have added a list of other prediction settings to the User page and a way to change a setting to the default.
<img width="500" alt="{4EFA1273-E53A-4333-948B-8AE3597821A8}.png" src="attachments/048fdc83-1c3e-41d2-a59b-44b0337a05bf">
Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#276
Reviewed-by: jebus <lorsbach@envipath.com>
Co-authored-by: Liam Brydon <lbry121@aucklanduni.ac.nz>
Co-committed-by: Liam Brydon <lbry121@aucklanduni.ac.nz>
This commit is contained in:
@ -2664,6 +2664,14 @@ def user(request, user_uuid):
|
||||
|
||||
return redirect(current_user.url)
|
||||
|
||||
if "change_default" in request.POST:
|
||||
new_default_uuid = request.POST["change_default"]
|
||||
current_user.default_setting = SettingManager.get_setting_by_id(
|
||||
current_user, new_default_uuid
|
||||
)
|
||||
current_user.save()
|
||||
return redirect(current_user.url)
|
||||
|
||||
return HttpResponseBadRequest()
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user