show dollor price in admin

This commit is contained in:
Parsa Nazer
2025-02-02 03:13:19 +03:30
parent 94ac22ed07
commit 02d3a42ee0
+5 -1
View File
@@ -1,5 +1,9 @@
from order.models import OrderModel
from product.models import DollorModel
def admin_pending_count(request):
pending_count = OrderModel.objects.filter(status='ADMIN_PENDING').count()
return str(pending_count)
def dollor_price(request):
dollor_object, _ = DollorModel.objects.get_or_create(unique_filed='unique')
return str(dollor_object.price)[:2]