Skip to content

Commit

Permalink
#85 Feat: change freshman ticket model meeting field (#86)
Browse files Browse the repository at this point in the history
* #34 Feat: add all tickets list page

* #68 Feat: add application complete page

* #70 Feat: modify experiencea and reason field

* #64 Feat: Debug=False

* #81 Fix: remove api url

* #77 Feat: add csrf exempt decortor and slove ssl error

* #85 Feat: change freshmanticket model meeting field

* #85 Feat: remove 80 ssl

---------

Co-authored-by: 강지윤 <[email protected]>
  • Loading branch information
kjiyun and 강지윤 authored Feb 28, 2024
1 parent 9791065 commit 9414b48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
18 changes: 18 additions & 0 deletions tickets/migrations/0008_alter_freshmanticket_meeting.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.4 on 2024-02-28 04:58

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('tickets', '0007_freshmanticket_count'),
]

operations = [
migrations.AlterField(
model_name='freshmanticket',
name='meeting',
field=models.CharField(default='불참', max_length=10),
),
]
2 changes: 1 addition & 1 deletion tickets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class FreshmanTicket(TimeStampedModel): #신입생 티켓
phone_num = models.CharField(max_length=20, unique=True)
major = models.CharField(max_length=30)
student_id = models.CharField(max_length=10, unique=True)
meeting = models.BooleanField(default=False)
meeting = models.CharField(max_length=10, default='불참')
reservation_id = models.CharField(max_length=10, unique=True, null=True) # 주문번호(예약번호)
count = models.PositiveIntegerField(default=1) # 신입생 티켓 매수 (=1)

Expand Down
6 changes: 3 additions & 3 deletions tickets/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Meta:
'phone_num': openapi.Schema('구매자 전화번호', type=openapi.TYPE_NUMBER),
'major': openapi.Schema('전공', type=openapi.TYPE_INTEGER),
'student_id': openapi.Schema('학번', type=openapi.TYPE_STRING),
'meeting': openapi.Schema('소모임 참석여부', type=openapi.TYPE_BOOLEAN)
'meeting': openapi.Schema('소모임 참석여부', type=openapi.TYPE_STRING)
}
),
responses={
Expand All @@ -71,7 +71,7 @@ class Meta:
'phone_num': '010-1234-5678',
'major': '컴퓨터공학과',
'student_id': 'C411111',
'meeting': True,
'meeting': '3/5',
'reservation_id': '12345ABCDE'
}
}
Expand Down Expand Up @@ -195,7 +195,7 @@ def delete(self, request, *args, **kwargs):



@method_decorator(csrf_exempt, name='dispatch')
# @method_decorator(csrf_exempt, name='dispatch')
class GeneralTicketOrderView(viewsets.ModelViewSet):
queryset = GeneralTicket.objects.all()
serializer_class = GeneralTicketDetailSerializer
Expand Down

0 comments on commit 9414b48

Please sign in to comment.