+ {% block form_before %}{% endblock %}
+ {% if adminform.model_admin.change_form_outer_before_template %}
+ {% include adminform.model_admin.change_form_outer_before_template %}
+ {% endif %}
+
+
+ {% if original.lon and original.lat %}
+
+
+ {% if original.country %}
+
+ 🇺🇳 {{ original.country }}
+
+ {% endif %}
+
+ {% if original.region_name %}
+
+
+ {{ original.region_name }}
+
+ {% endif %}
+
+ {% if original.city %}
+
+
+ {{ original.city }}
+
+ {% endif %}
+
+ {% if original.zip_code %}
+
+
+ {{ original.zip_code }}
+
+ {% endif %}
+
+ {% if original.isp %}
+
+
+ {{ original.isp }}
+
+ {% endif %}
+ {% if original.ip_address %}
+
+
+ {{ original.ip_address }}
+
+ {% endif %}
+
+
+
+ {% if map_html %}
+
+
+
+ {{ map_html|safe }}
+
+
+ {% else %}
+
نقشه در دسترس نیست
+ {% endif %}
+ {% else %}
+
موقعیت جغرافیایی موجود نیست
+ {% endif %}
+
+
+ {% if adminform.model_admin.change_form_outer_after_template %}
+ {% include adminform.model_admin.change_form_outer_after_template %}
+ {% endif %}
+
+ {% block form_after %}{% endblock %}
+
+{% endblock %}
+
+{% block extrajs %}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/backend/utils/admin.py b/backend/utils/admin.py
index a86239c..1107fab 100644
--- a/backend/utils/admin.py
+++ b/backend/utils/admin.py
@@ -2,6 +2,7 @@ from order.models import OrderModel
from product.models import DollorModel, CommentModel
from ticket.models import Ticket
from home.models import LearnVideoModel
+from account.models import SecurityBreachAttemptModel
def admin_pending_count(request):
pending_count = OrderModel.objects.filter(status='ADMIN_PENDING').count()
@@ -20,6 +21,8 @@ def new_ticket_count(request):
def new_learn_video_count(request):
return LearnVideoModel.objects.filter(viewd=False).count()
+def new_attck_count(request):
+ return SecurityBreachAttemptModel.objects.filter(viewd=False).count()
from django.contrib import admin, messages
from unfold.admin import ModelAdmin