Skip to content

Commit 4120ba9

Browse files
committed
Merge branch 'devdev' into feature/sponsors
# Conflicts: # .gitignore # pyconweb2022/program/serializers.py # pyconweb2022/program/tests.py
2 parents 33dd788 + 491d6fe commit 4120ba9

File tree

16 files changed

+10695
-13
lines changed

16 files changed

+10695
-13
lines changed

.github/workflows/deploy_on_dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
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

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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/

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"private": true,
3+
"workspaces": ["frontend"],
4+
"scripts": {
5+
"frontend": "yarn workspace frontend"
6+
}
7+
}

pyconweb2022/content/admin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
from django.db import models
33

44
from content.models import Content
5+
from content.resources import ContentResource
56

67
from 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",

pyconweb2022/content/resources.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

pyconweb2022/news/admin.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
from django.contrib import admin
22

3+
from import_export.admin import ImportExportModelAdmin
4+
35
from 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",

pyconweb2022/news/resources.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

pyconweb2022/program/admin.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@
33

44
from 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

1315
admin.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",

pyconweb2022/program/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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", "한글"),

pyconweb2022/program/resources.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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

0 commit comments

Comments
 (0)