-1
一些關於Django的 正如照片顯示 我不知道爲什麼會出現有一個AttributeError的
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)
請提供的示例代碼和錯誤輸出直接在這裏並沒有外部圖像源。你的問題標題也不是描述性的。它應該告訴關於這個問題的一些事 – dahrens
我已經添加了代碼。 –