-1
Die Funktion Objekt hat kein Attribut 'entry_set'
Etwas über Django So wie die Foto-Show Ich weiß nicht, warum es hat, ist ein Attribut
from django.shortcuts import render
from .models import Topic
def topic(request, topic_id):
topics = Topic.objects.get(id=topic_id)
entries = topic.entry_set.order_by('-date_added')
context = {'topic': topic, 'entries': entries}
return render(request, 'learning_logs/topic.html', context)
Bitte geben Sie Beispielcode und Fehlerausgang direkt hier und ohne externe Bildquellen. Ihr Fragentitel ist auch nicht beschreibend. Es sollte etwas über die Frage erzählen. – dahrens
Ich hatte den Code hinzufügen. –