Skip to content

Commit

Permalink
마무
Browse files Browse the repository at this point in the history
  • Loading branch information
ot8844 committed Mar 27, 2015
1 parent 6d0c287 commit 96dfb85
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 46 deletions.
14 changes: 7 additions & 7 deletions strawberry/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ def reserve(request):
numBerries = request.POST["numBerries"]
date = request.POST["date"]

if (len(studentID) != 8) : status = u'학번을 다시 입력해 주세요'
elif (len(password) != 4) : status = u'패스워드는 4자리 숫자입니다'
elif (not str(password).isdigit()) : status = u'패스워드는 4자리 숫자입니다'
elif (not numBerries.isdigit()) : status = u'딸기 수는 숫자로만 입력해 주세요'
if (len(studentID) != 8) : status = u'학번을 다시 입력해 주세요. write studentID again'
elif (len(password) != 4) : status = u'패스워드는 4자리 숫자입니다. write password again'
elif (not str(password).isdigit()) : status = u'패스워드는 4자리 숫자입니다. write password again'
elif (not numBerries.isdigit()) : status = u'딸기 수는 숫자로만 입력해 주세요.'
elif (not numRolls.isdigit()) : status = u'김밥 수는 숫자로만 입력해 주세요'
elif (len(phone.split("-")) != 3) : status = u'전화번호 양식에 맞게 입력해주세요'
elif (len(phone.split("-")) != 3) : status = u'전화번호 양식에 맞게 입력해주세요. write phone number again'
else:
reservation = Reservation(studentID=int(studentID), name=name,
club=club, phoneNum=phone, password=password,
Expand Down Expand Up @@ -100,9 +100,9 @@ def modify(request):
reservations = []
if request.method == 'POST':
if request.POST["studentID"] != None:
studentID = int(request.POST["studentID"])
studentID = request.POST["studentID"]
#password = request.POST["password"]
reservations = Reservation.objects.all().filter(studentID=studentID)
if (studentID != '') : reservations = Reservation.objects.all().filter(studentID=int(studentID))
else:
reservationID = request.GET.get('reservationID', None)
password = request.GET.get('password', None)
Expand Down
55 changes: 32 additions & 23 deletions templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,48 @@
</a>
</div>

<div class="jumbotron">
<h1>2015 딸기파티</h1>
<p class="lead">딸기파티asdfasdfasdfasdf</p>
<p>
<a class="btn btn-lg btn-success" href="/reserve/" role="button">딸기 예약</a>
<a class="btn btn-lg btn-primary" href="/modify" role="button">예약 확인</a>
</p>
</div>


<div class="row marketing">
<div class="col-lg-6">
<h4>여기는</h4>
<p>맘대로</p>
<h4>예약관련 공지</h4>
<p>예약은 반드시 이곳에서 진행해주세요!<br>
2015 딸기파티의 <strong>딸기가격은 1kg당 7000원</strong>입니다.<br>
(한 박스는 두 사람이 먹기에 적당합니다.)<br>
(예약을 하지 않고 현장에서 구매 시 수량도 적을뿐더러 7500원으로 사야 되니 꼭 예약을 해주세요!)<br>
2015 딸기파티의 <strong>김밥가격은 1줄당 2000원</strong>입니다.<br>
‘예약’ 버튼을 눌러 주의 사항을 꼭 읽으신 후에 예약을 진행해주세요.<br>
본인이 이전에 했던 주문에 대한 예약확인은 ‘예약 확인’ 버튼 클릭 후 학번을 입력하여 확인할 수 있습니다.<br>
(또한 이곳에서 주문을 취소할 수 있습니다.)<br>
문의번호 : 010-4726-9629</p>

<h4>Subheading</h4>
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

<h4>Subheading</h4>
<p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
</div>

<div class="col-lg-6">
<h4>Subheading</h4>
<p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>

<h4>Subheading</h4>
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum.</p>

<h4>Subheading</h4>
<p>Maecenas sed diam eget risus varius blandit sit amet non magna.</p>
<h4>Announcement</h4>
<p>You can reserve strawberry at this page. <br>
<strong>The price of strawberry is 7000won per 1kg.</strong><br>
(1 box is enough for 2 people to eat)<br>
(If you don’t make an reservation, then you have to buy 1 box for 7500won and there are only few boxes.)<br>
<strong>The price of Kimbab is 2000won for each line.</strong><br>
Press the ‘Reservation’ button and make an reservation after read the notice carefully.<br>
You can check the reservation that you made by pressing ‘Reservation check’ button and enter the student ID.<br>
(Also, you can cancel the reservation here)<br>
If you want to modify the reservation, then please cancel the previous reservation and make an reservation again.
<br>phone : 010-4726-9629<br>
</p>
</div>
</div>

<div class="jumbotron">
<h1>2015 딸기파티</h1>
<p class="lead">4월 1일부터 11일까지</p>
<p>
<a class="btn btn-lg btn-success" href="/reserve/" role="button">딸기 예약</a>
<a class="btn btn-lg btn-primary" href="/modify" role="button">예약 확인</a>
</p>
</div>

</div> <!-- /container -->


Expand Down
47 changes: 31 additions & 16 deletions templates/reserve.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,63 +54,78 @@
</a>
</div>

<div class="jumbotron">
<h1>2015 딸기파티 신청하기</h1>
<h2>지금 신청하세요!</h2>
<h3>신청 하게.</h3>
<p class="lead"> zzz</p>
<div class="row marketing">
<div class="col-lg-13">
<h4>주의사항</h4>
<p> 기입해야 되는 내용을 정확히 입력해주세요.<br>
연락처는 반드시 휴대폰 번호를 적어주시기 바랍니다.<br>딸기를 5box 이상 주문 시 수령 이틀 전과 하루 전 상근시간에 연락을 드리니 꼭 틀리지 않게 적어주시길 바랍니다.<br>
비밀번호는 네 자리의 숫자로 꼭 기억해주세요.<br>
<span style="color:red"><strong>주문을 수정해야 할 시에는 반드시 학번과 비밀번호를 이용해 전 주문을 취소 후 다시 예약해야함을 꼭 기억해주세요.</strong></span><br></p>

</div>

<div class="col-lg-13">
<h4>Notice</h4>
<p>Please write things precisely.<br>
Please write your phone number.<br>
If you order more than 5 boxes, we will call you two times. The day before and before you will get the strawberry. So please write phone number precisely.
The password is 4 number. Please remember it.<br>
<span style="color:red"><strong>If you want to modify the reservation, you must use ‘Student ID and Password’ and must ‘Cancel’ the previous reservation and make reservation again.</strong></span>
</p>
</div>

</div>
{% if status != 'success' %}
<form class="form-horizontal" action="#" method="post" style="">
{% csrf_token %}
<div class="form-group">
<label for="date" class="col-sm-2 control-label">날짜</label>
<label for="date" class="col-sm-2 control-label">날짜(date)</label>
<div class="col-sm-10">
<input type="text" id="dpd3" value="04/01/2015" name="date" class="form-control" readonly placeholder="4월 1일~4월 11일(일요일 제외)입니다">
</div>
</div>

<div class="form-group">
<label for="inputID" class="col-sm-2 control-label">학번</label>
<label for="inputID" class="col-sm-2 control-label">학번(studentID)</label>
<div class="col-sm-10">
<input type="text" name="studentID" class="form-control">
</div>
</div>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">이름</label>
<label for="name" class="col-sm-2 control-label">이름(name)</label>
<div class="col-sm-10">
<input type="text" name="name" class="form-control">
</div>
</div>
<div class="form-group">
<label for="club" class="col-sm-2 control-label">단체명</label>
<label for="club" class="col-sm-2 control-label">단체명(club)</label>
<div class="col-sm-10">
<input type="text" name="club" class="form-control">
</div>
</div>
<div class="form-group">
<label for="phone" class="col-sm-2 control-label">전화번호</label>
<label for="phone" class="col-sm-2 control-label">전화번호(phone)</label>
<div class="col-sm-10">
<input type="text" name="phone" class="form-control" placeholder="양식 : 010-1111-1111">
</div>

</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">비밀번호</label>
<label for="password" class="col-sm-2 control-label">비밀번호(password)</label>
<div class="col-sm-10">
<input type="password" name="password" class="form-control" placeholder="4자리 숫자로 입력하세요">
<input type="password" name="password" class="form-control" placeholder="4자리 숫자로 입력하세요. write only 4 digits">
</div>
</div>
<div class="form-group">
<label for="numBerries" class="col-sm-2 control-label">딸기 수</label>
<label for="numBerries" class="col-sm-2 control-label">딸기 수(strawberry)</label>
<div class="col-sm-10">
<input type="text" name="numBerries" class="form-control" placeholder="숫자만 입력하세요">
<input type="text" name="numBerries" class="form-control" placeholder="숫자만 입력하세요. write only number ">
</div>
</div>
<div class="form-group">
<label for="numRolls" class="col-sm-2 control-label">김밥 수</label>
<label for="numRolls" class="col-sm-2 control-label">김밥 수(kimbob)</label>
<div class="col-sm-10">
<input type="text" name="numRolls" class="form-control" placeholder="숫자만 입력하세요">
<input type="text" name="numRolls" class="form-control" placeholder="숫자만 입력하세요. write only number">
</div>
</div>

Expand Down

0 comments on commit 96dfb85

Please sign in to comment.