Features: 1) Add logging configuration with a logger setup; 2) Log debug information in download_digital_asset_view function;
Fixes: 1) Add missing `logging` import; Extra: 1) Remove redundant alias for `uuid` module.
This commit is contained in:
parent
cbd72f10b8
commit
1cc75787ab
1 changed files with 4 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import logging
|
||||
import mimetypes
|
||||
import os
|
||||
import traceback
|
||||
import uuid as uuid_module
|
||||
|
||||
import requests
|
||||
from django.contrib.sitemaps.views import index as _sitemap_index_view
|
||||
|
|
@ -54,6 +54,8 @@ from evibes import settings
|
|||
from evibes.settings import LANGUAGES
|
||||
from payments.serializers import TransactionProcessSerializer
|
||||
|
||||
logger = logging.getLogger("django")
|
||||
|
||||
|
||||
@cache_page(60 * 60 * 12)
|
||||
@vary_on_headers("Host")
|
||||
|
|
@ -469,6 +471,7 @@ def download_digital_asset_view(request, *args, **kwargs):
|
|||
a JsonResponse with an error message if an error occurs during the process.
|
||||
"""
|
||||
try:
|
||||
logger.debug(f"download_digital_asset_view: {kwargs}")
|
||||
uuid = urlsafe_base64_decode(str(kwargs.get("encoded_uuid"))).decode("utf-8")
|
||||
|
||||
download = DigitalAssetDownload.objects.get(order_product__uuid=uuid)
|
||||
|
|
|
|||
Loading…
Reference in a new issue