mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 10:36:55 +00:00
**Update dependencies to their latest versions**
Upgrade various Python package dependencies in `uv.lock`. Includes updates to critical packages such as Django (6.0.5 → 6.1.2), DRF (3.17.1 → 3.18.3), and others. Also adds new packages: `jsonschema`, `jsonschema-specifications`, and `importlib-resources`.
This commit is contained in:
1 parent
91729f91dc
commit
1bbe0071a0
4 files changed
+321
-144
No files matched your search
+2
-1
@@ -8,6 +8,7 @@ from django.contrib.auth.models import User
|
||||
from django.contrib.auth.password_validation import validate_password
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db.models import Case, When, F, PositiveSmallIntegerField, FileField, QuerySet
|
||||
from django.utils.crypto import get_random_string
|
||||
from django.http import FileResponse
|
||||
from drf_yasg.utils import swagger_auto_schema
|
||||
from rest_framework import viewsets, serializers, mixins, permissions, status, renderers
|
||||
@@ -62,7 +63,7 @@ class UserViewSet(viewsets.ModelViewSet): # pylint: disable=too-many-ancestors
|
||||
serializer = self.get_serializer(data=request.data)
|
||||
if serializer.is_valid():
|
||||
if target_user.username == serializer.data['username']:
|
||||
password = User.objects.make_random_password()
|
||||
password = get_random_string(12)
|
||||
target_user.set_password(password)
|
||||
target_user.save()
|
||||
resp_serializer = self.get_serializer({
|
||||
|
||||
Reference in new issue
Block a user