detail 페이지로 이동시키고 싶어서

이렇게 하면 작동안됨. 왜냐하면 detail페이지는 pk를 받아SS야 하기 때문이다. 따로 넘겨줄수없기 때문에 내부 메소드를 수정시켜주어야함.

profile이 있을 때 추가적인 인증과정 없이 수정링크로 들어갈수 있는 edit을 보여주기 때문이다.
if문을 이용하여 인증과정을 넣어준다.

그밖의 닉네임 미설정을 보여주는 등 자잘한 설정을 해줌
<div>
<div style="text-align: center; max-width: 500px; margin: 4rem auto;">
{% if target_user.profile %}
<img src="{{ target_user.profile.image.url }}" alt=""
style="height: 12rem; width:12rem; border-radius: 20rem; margin-bottom: 2rem;">
<h2 style="font-family: 'NanumSquareB'">
{{ target_user.profile.nickname }}
{% if target_user == user %}
<a href="{% url 'profileapp:update' pk=target_user.profile.pk %}">
edit
</a>
{% endif %}
</h2>
<h5 style="margin-bottom:3rem">
{{ target_user.profile.message }}
</h5>
{% else %}
{% if target_user == user %}
<a href="{% url 'profileapp:create' %}">
<h2 style="font-family: 'NanumSquareB'">
Create Profile
</h2>
</a>
{% else %}
<h2>
닉네임 미설정
</h2>
{% endif %}
{% endif %}
배운것 정리