# articles > templates > articles > index.html
회원 가입 로직 작성
버튼 하나 만들어주자
더보기
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h2>반갑습니다, {{ user.username }} 님</h2>
<h1>Articles</h1>
<a href="{% url "accounts:login" %}">Login</a>
<form action="{% url "accounts:logout" %}" method="POST">
{% csrf_token %}
<input type="submit" value="Logout">
</form>
<a href="{% url "accounts:signup" %}">Signup</a>
<a href="{% url "articles:create" %}">CREATE</a>
<hr>
{% for article in articles %}
<p>글 번호: {{ article.pk }}</p>
<a href="{% url "articles:detail" article.pk %}a">
<p>글 제목: {{ article.title }}</p>
</a>
<p>글 내용: {{ article.content }}</p>
<hr>
{% endfor %}
</body>
</html>
'WEB > Django prac' 카테고리의 다른 글
[Django prac][Authentication2] 6. 회원 정보 수정 페이지 작성 (0) | 2024.04.01 |
---|---|
[Django prac][Authentication2] 5. 회원탈퇴 (0) | 2024.04.01 |
[Django prac][Authentication2] 3. 회원가입 (0) | 2024.04.01 |
[Django prac][Authentication2] 2. 회원가입 (0) | 2024.04.01 |
[Django prac][Authentication] 9. 로그아웃 되었는지 확인 (0) | 2024.03.31 |