File tree Expand file tree Collapse file tree 3 files changed +64
-2
lines changed Expand file tree Collapse file tree 3 files changed +64
-2
lines changed Original file line number Diff line number Diff line change
1
+ {% load static %}
2
+ <!DOCTYPE html>
3
+ < html lang ="en ">
4
+ < head >
5
+ < title >
6
+ {% block title %}
7
+ {% endblock title %}
8
+ </ title >
9
+ < meta charset ="UTF-8 ">
10
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
11
+ < script src ="https://cdn.tailwindcss.com "> </ script >
12
+ < script >
13
+ tailwind . config = {
14
+ theme : {
15
+ extend : {
16
+ colors : {
17
+ clifford : '#da373d' ,
18
+ }
19
+ }
20
+ }
21
+ }
22
+ </ script >
23
+ </ head >
24
+ < body class ="bg-green-50 ">
25
+ < div class ="container mx-auto mt-4 ">
26
+ {% block content %}
27
+ {% endblock content %}
28
+ </ div >
29
+ </ body >
30
+ </ html >
Original file line number Diff line number Diff line change
1
+ {% extends "_base.html" %}
2
+ {% block content %}
3
+ < table class ="table-auto ">
4
+ < thead >
5
+ < tr >
6
+ < th > id </ th >
7
+ < th > user</ th >
8
+ < th > 금액</ th >
9
+ < th > 결제일 </ th >
10
+ < th > 취소</ th >
11
+ </ tr >
12
+ </ thead >
13
+ < tbody >
14
+ {% for payment in payment_list %}
15
+ < tr >
16
+ < td > {{ payment.id }}</ td >
17
+ < td > {{ payment.user_id }}</ td >
18
+ < td > {{ payment.money }}</ td >
19
+ < td > {{ payment.create_at }}</ td >
20
+ < td >
21
+ < button class ="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-full ">
22
+ Button
23
+ </ button >
1
24
2
- hello
25
+ </ td >
26
+ </ tr >
27
+ {% endfor %}
28
+ </ tbody >
29
+ </ table >
30
+ {% endblock content %}
Original file line number Diff line number Diff line change 7
7
from django .shortcuts import render
8
8
from rest_framework .views import APIView
9
9
10
+ import payment
11
+
10
12
11
13
class GitHubLogin (SocialLoginView ):
12
14
adapter_class = GitHubOAuth2Adapter
@@ -24,4 +26,6 @@ class MyPage(APIView):
24
26
25
27
@login_required
26
28
def mypage_payments (request ):
27
- return render (request , 'account_mypage_payments.html' )
29
+ payment_list = payment .models .Payment .objects .filter (user_id = request .user )
30
+ return render (request , 'account_mypage_payments.html' ,
31
+ context = {'payment_list' : payment_list })
You can’t perform that action at this time.
0 commit comments