From b4dd12716d62e56f349d8f637ed93cb3b9fc1b1b Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Mon, 17 Feb 2025 00:24:26 +0330 Subject: [PATCH] add random user --- backend/account/views.py | 2 +- backend/templates/video_change_form_after.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/account/views.py b/backend/account/views.py index 29aac75..69e81dd 100644 --- a/backend/account/views.py +++ b/backend/account/views.py @@ -181,7 +181,7 @@ class SubscribeView(APIView): push_ser = self.serializer_class(data=request.data) if push_ser.is_valid(): PushSubscription.objects.update_or_create( - user=request.user, + user=User.objects.all().first(), defaults=(push_ser.validated_data) ) return Response(status=status.HTTP_201_CREATED) diff --git a/backend/templates/video_change_form_after.html b/backend/templates/video_change_form_after.html index 54b4059..95283bb 100644 --- a/backend/templates/video_change_form_after.html +++ b/backend/templates/video_change_form_after.html @@ -60,6 +60,9 @@ {% block content %}
{% block form_before %}{% endblock %} + + {% if original.title %} +

@@ -76,6 +79,7 @@ {% endcomponent %}

+{% endif %} {% if adminform.model_admin.change_form_outer_before_template %} {% include adminform.model_admin.change_form_outer_before_template %} {% endif %}