update prints to log

This commit is contained in:
Parsa Nazer
2026-05-12 09:47:45 +03:30
parent 45fe9c1f4c
commit e5d940e3c9
9 changed files with 44 additions and 29 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
from django.db import models
from django.utils.text import slugify
import logging
logger = logging.getLogger(__name__)
from account.models import User
from django.urls import reverse
import requests
@@ -148,7 +151,7 @@ class DollorModel(models.Model):
data = response.json()
price = int(data["lastTradePrice"])
price_in_usd = price / 10.0
print('\n\nprice from api \n\n')
logger.info('Price fetched from API')
except Exception as e:
return self.defualt_price