diff --git a/backend/templates/admin/fake_login.html b/backend/templates/admin/fake_login.html index 0c28127..a965bfb 100644 --- a/backend/templates/admin/fake_login.html +++ b/backend/templates/admin/fake_login.html @@ -2,10 +2,7 @@ {% load i18n static %} -{% block extrastyle %} - {{ block.super }} - {{ form.media }} -{% endblock %} + {% block bodyclass %}{{ block.super }}bg-base-50 login dark:bg-base-900{% endblock %} @@ -19,17 +16,21 @@ {% block breadcrumbs %}{% endblock %} +{% block extrastyle %}{{ block.super }} + +{% endblock %} + {% block title %} - {{ title }} | {{ site_title }} + پنل مدیریت هی ملز {% endblock %} {% block base %} -
+

- {% trans 'Welcome back to' %} - {{ site_title|default:_('Django site admin') }} + خوش امدید به + پنل مدیریت هی ملز

{% include "unfold/helpers/messages.html" %} @@ -67,12 +68,6 @@ - - - - - -
@@ -80,7 +75,7 @@
- {% if site_url %} - - arrow_back {% trans 'Return to site' %} + + arrow_forward بازگشت به وبسایت - {% endif %} {% if not theme %} {% include "unfold/helpers/theme_switch.html" %} @@ -136,9 +129,9 @@
- {% if image %} - {% endblock %} diff --git a/backend/utils/admin.py b/backend/utils/admin.py index 67786f3..a86239c 100644 --- a/backend/utils/admin.py +++ b/backend/utils/admin.py @@ -27,7 +27,7 @@ from home.models import LearnVideoModel from import_export.admin import ImportExportModelAdmin from unfold.contrib.import_export.forms import ExportForm, ImportForm, SelectableFieldsExportForm from unfold.decorators import action, display -from django.shortcuts import redirect +from django.shortcuts import redirect,reverse from django.contrib.contenttypes.models import ContentType @@ -40,7 +40,7 @@ class ModelAdmin(ModelAdmin): learn_video = LearnVideoModel.objects.get( content_type=content_type, ) - return redirect(f'/admin/home/learnvideomodel/{learn_video.id}/change/') + return redirect(reverse("admin:home_learnvideomodel_change", args=[learn_video.pk])) except Exception as e: messages.error(request, f"برای بخش {content_type} ویدیویی اپلود نشده است") - return redirect(f'/admin/home/learnvideomodel/') \ No newline at end of file + return redirect("admin:home_learnvideomodel_changelist") \ No newline at end of file