ユーザーが完了した質問(Cプログラミングの場合:-))を記載したページがあります。 10人がログインしているすべてのユーザーがこれらにアクセスできるとします。表示されるユーザー固有の状態を保存して表示する正しい方法
ページでは、このようなものです:
<table>
<tr>
<th>Test desc</th>
<th>Test state</th>
</tr>
{% for t in test%}
<tr>
<td>{{ t.desc }}</td>
<td>'display a image if it is completed else another image'</td>
</tr>
{% endfor %}
</table>
ユーザーは、私は2つのことを知っておく必要がありviews.py
def test(request):
cProblems = Problems_c.objects.all()
return render_to_response('subject/test.html', {'list':cProblems})
からこのページに転送されます。
- この追加のユーザー固有情報をdjangoに保存する方法。
ありがとうございます。私は明日それを試してみるよ。 – John