/
post_modify.html
49 lines (44 loc) · 1.55 KB
/
post_modify.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% extends 'base.html' %}
{% load static %}
{% block head %}
<link rel="stylesheet" type="text/css" href="{% static 'css/post_modify.css' %}">
<!-- Fontawesome 적용 -->
<script src="https://kit.fontawesome.com/0b02921f0e.js" crossorigin="anonymous"></script>
{% endblock head %}
{% block title %}
포스트 수정 페이지 | Instagram
{% endblock title %}
{% block _nav %}
{% include '_nav.html' %}
{% endblock _nav %}
{% block body %}
{% if messages %}
<div >
{% for message in messages %}
{{ message.tags }}! {{ message.message }}
{% endfor %}
</div>
{% endif %}
{% if post %}
<div class="main">
<section class="card_section">
<div class="card">
<form action="{% url 'pystagram:pn_post_modify' post.post_id %}" method="POST" enctype="multipart/form-data" class="post_modify_form">
{% csrf_token %}
<div class="form-group" id="post_img">
<img src="{{ post.post_img_url }}" alt="Image">
</div>
<div class="form-group" id="modify_content">
<textarea name="content" rows="10" cols="128">{{ post.content }}</textarea>
</div>
<!-- 해시태그 -->
<div class="form-group" id="modify_hashtag">
<textarea name="hashtag" rows="1" cols="128">{{ post.hashtags }}</textarea>
</div>
<button type="submit" class="btn btn-primary">수정하기</button>
</form>
</div>
</section>
</div>
{% endif %}
{% endblock body %}