File tree Expand file tree Collapse file tree 16 files changed +10695
-13
lines changed
Expand file tree Collapse file tree 16 files changed +10695
-13
lines changed Original file line number Diff line number Diff line change 6969 run : |
7070 ./update_secrets.sh
7171
72+ - name : Test with Django Test
73+ run : |
74+ source ./pyconweb2022-zappa/bin/activate
75+ cd pyconweb2022
76+ python manage.py test
77+
7278 - name : Test with pytest
7379 run : |
7480 source ./pyconweb2022-zappa/bin/activate
Original file line number Diff line number Diff line change @@ -148,6 +148,5 @@ pyconweb2022/.idea
148148
149149/frontend /.serverless_nextjs
150150/frontend /.serverless
151- # Migrations
152- /pyconweb2022 /sponsor /migrations /
153- /pyconweb2022 /program /migrations /
151+
152+ node_modules /
Original file line number Diff line number Diff line change 1+ {
2+ "private" : true ,
3+ "workspaces" : [" frontend" ],
4+ "scripts" : {
5+ "frontend" : " yarn workspace frontend"
6+ }
7+ }
Original file line number Diff line number Diff line change 22from django .db import models
33
44from content .models import Content
5+ from content .resources import ContentResource
56
67from martor .widgets import AdminMartorWidget
8+ from import_export .admin import ImportExportModelAdmin
79
810
9- class ContentAdmin (admin .ModelAdmin ):
11+ class ContentAdmin (ImportExportModelAdmin ):
12+ resource_class = ContentResource
1013 list_display = (
1114 "slug" ,
1215 "title" ,
Original file line number Diff line number Diff line change 1+ from import_export import resources
2+
3+ from content .models import Content
4+
5+
6+ class ContentResource (resources .ModelResource ):
7+ class Meta :
8+ model = Content
Original file line number Diff line number Diff line change 11from django .contrib import admin
22
3+ from import_export .admin import ImportExportModelAdmin
4+
35from news .models import News
6+ from news .resources import NewsResource
47
58
6- class NewsAdmin (admin .ModelAdmin ):
9+ class NewsAdmin (ImportExportModelAdmin ):
10+ resource_class = NewsResource
711 app_label = "News"
812 list_display = (
913 "id" ,
Original file line number Diff line number Diff line change 1+ from import_export import resources
2+
3+ from news .models import News
4+
5+
6+ class NewsResource (resources .ModelResource ):
7+ class Meta :
8+ model = News
Original file line number Diff line number Diff line change 33
44from import_export .admin import ImportExportModelAdmin
55
6- from .models import Proposal , ProgramCategory
6+ from program .models import Proposal , ProgramCategory
7+ from program .resources import ProgramCategoryResource , ProposalResource
78
89
9- class ProgramCategoryAdmin (admin .ModelAdmin ):
10+ class ProgramCategoryAdmin (ImportExportModelAdmin ):
11+ resource_class = ProgramCategoryResource
1012 list_display = ("name" ,)
1113
1214
1315admin .site .register (ProgramCategory , ProgramCategoryAdmin )
1416
1517
16- class ProgramAdmin (admin .ModelAdmin ):
18+ class ProgramAdmin (ImportExportModelAdmin ):
19+ resource_class = ProposalResource
1720 list_display = (
1821 "title" ,
1922 "user_name" ,
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class Proposal(models.Model):
4545
4646 # TODO: 다국어 기능 추가
4747 language = models .CharField (
48- max_length = 1 ,
48+ max_length = 2 ,
4949 choices = (
5050 ("" , "---------" ),
5151 ("K" , "한글" ),
Original file line number Diff line number Diff line change 1+ from program .models import ProgramCategory , Proposal
2+
3+ from import_export import resources
4+
5+
6+ class ProgramCategoryResource (resources .ModelResource ):
7+ class Meta :
8+ model = ProgramCategory
9+
10+
11+ class ProposalResource (resources .ModelResource ):
12+ class Meta :
13+ model = Proposal
You can’t perform that action at this time.
0 commit comments