C - Read View(Detail View) - U - D
{% extends 'base.html' %}
{% block content %}
<div>
<div style="text-align: center; max-width: 500px; margin: 4rem auto">
<p>
{{ user.date_joined }} # 밑에서 수정 필요 (해당 페이지의 유저 정보 보여주도록)
</p>
<h2>
{{ user.username }}
</h2>
</div>
</div>
{% endblock %}
몇 번 유저 객체에 접근할 것인지 지정해줘야 함 - <int:pk>
path('detail/<int:pk>', AccountDetailView.as_view(), name='detail'),
hello_world 에서 login 클릭시 링크 연결 안됌
class AccountDetailView(DetailView):
model = User
context_object_name = 'target_user' # 내용 추가
template_name = 'accountapp/detail.html'