Removed 'the mother of all debugging' again. :D

This commit is contained in:
Marcus Scholz 2020-12-25 19:50:34 +01:00
parent 224eb87d76
commit b876435d8c
2 changed files with 0 additions and 4 deletions

View File

@ -95,7 +95,6 @@ def auto_delete_file_on_change(sender, instance, **kwargs):
old_file = Explorer.objects.get(pk=instance.pk).profile_image old_file = Explorer.objects.get(pk=instance.pk).profile_image
except Explorer.DoesNotExist: except Explorer.DoesNotExist:
return False return False
print("Deleting:", old_file)
new_file = instance.profile_image new_file = instance.profile_image
if not old_file == new_file: if not old_file == new_file:
old_file.delete(save=False) old_file.delete(save=False)

View File

@ -56,7 +56,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
return render(request, 'explorer/profile_update.html', context) return render(request, 'explorer/profile_update.html', context)
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
print(request.POST)
explorer_user_change_form = ExplorerUserChangeForm( explorer_user_change_form = ExplorerUserChangeForm(
request.POST, request.POST,
instance=request.user instance=request.user
@ -71,8 +70,6 @@ class ExplorerProfileUpdateView(IsAuthenticatedMixin, View):
explorer_user_change_form.save() explorer_user_change_form.save()
explorer_change_form.save() explorer_change_form.save()
print(explorer_change_form.cleaned_data)
messages.success( messages.success(
self.request, self.request,
_('Successfully updated Explorer profile') _('Successfully updated Explorer profile')