# Trova il bug: Django > Uno snippet di codice. Trova il bug, o dimostra che non ce n'è. Sfida del giorno: 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}) ``` ## Il tuo verdetto - Falla di sicurezza - Bug di logica - Stile del codice - Nessun problema Un tentativo al giorno. La risposta appare subito dopo. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/it/sfida-del-giorno/django