development branch created to preserve working deploy project

This commit is contained in:
2025-08-02 17:37:16 +03:00
parent 5e65ea0f7c
commit e824e87953
659 changed files with 90008 additions and 137 deletions
+6 -4
View File
@@ -1,5 +1,5 @@
from django.contrib.auth import get_user_model
from django.contrib.auth.views import LoginView
from django.contrib.auth.views import LoginView, PasswordChangeView
from django.http import HttpResponseForbidden, JsonResponse
from django.shortcuts import render
from django.urls import reverse_lazy
@@ -192,7 +192,9 @@ class UserActiveView(LoginRequiredMixin, View):
return JsonResponse({'success': True, 'is_active': target_user.is_active})
class UserChangePasswordView(LoginRequiredMixin, View):
class CustomPasswordChangeView(PasswordChangeView):
template_name = 'registration/change_password.html'
form_class = UserChangePasswordForm
success_url = reverse_lazy('home')
def get_success_url(self):
next_url = self.request.GET.get('next') or self.request.POST.get('next')
return next_url or reverse_lazy('dashboard')