# Hatayı bul: Django > Tek bir kod parçası. Hatayı bul ya da hata olmadığını kanıtla. Günlük meydan okuma: 2026-08-19 (UTC) · Senior ```python import logging from django.http import JsonResponse from .models import Article logger = logging.getLogger(__name__) def get_article(request, slug): try: article = Article.objects.get(slug=slug) except Article.DoesNotExist: logger.error("Article not found: slug=%s", slug) return JsonResponse({"error": "Not found"}, status=404) return JsonResponse({"title": article.title, "body": article.body}) ``` ## Kararın - Güvenlik açığı - Mantık hatası - Kod stili - Sorun yok Günde bir deneme. Cevap hemen ardından görünür. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/tr/gunluk-meydan-okuma/django