Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 16 additions & 12 deletions FoodPoint/Accounts/templates/login.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<!DOCTYPE html>
<html lang="en">
{% extends 'base.html'%}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Log in</title>
{% load static %}
{% block extrahead %}
<title>LogIn</title>
<link rel="stylesheet" href="{% static 'signIn.css' %}">
{% endblock %}
</head>

<body>
{% block content %}
<div class = "signIn_container">
<div class="img_container">
<img class="logoImg" src="{% static 'logo.png' %}">
</div>
<form method ="POST" action="{% url 'login' %}">
{% csrf_token %}
<input name="username" type="text" class="userLogin" placeholder="전화번호, 사용자 이름 또는 이메일 " value="">
<input name="password" type="password" class="userLogin" placeholder="비밀번호" value="">
<input id="loginButton" class="btn btn-primary" type="submit" value="로그인">
<input name="username" type="text" class="signIn" placeholder="전화번호, 사용자 이름 또는 이메일 " value="">
<input name="password" type="password" class="signIn" placeholder="비밀번호" value="">
<input id="confirmBtn" class="btn btn-primary" type="submit" value="로그인">
</form>
</body>
</html>
</div>
{% endblock %}
Binary file modified FoodPoint/FoodPoint/__pycache__/settings.cpython-39.pyc
Binary file not shown.
Binary file modified FoodPoint/FoodPoint/__pycache__/urls.cpython-39.pyc
Binary file not shown.
3 changes: 2 additions & 1 deletion FoodPoint/FoodPoint/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<li class="navbar_item"><a href="{%url 'introduce'%}">푸포란?</a></li>
<li class="navbar_item"><a href="{%url 'register'%}">가게 등록</a></li>
<li class="navbar_item"><a href="#">마이페이지</a></li>
<li class="navbar_item"><a href="{%url 'signIn'%}">로그인</a></li>
<li class="navbar_item"><a href="{%url 'signIn'%}">회원가입</a></li>
<li class="navbar_item"><a href="{%url 'login'%}">로그인</a></li>
</ul>
<div class="navbar_search">
<span class="search_description">자주가는 가게 찾아보기 :</span>
Expand Down
4 changes: 2 additions & 2 deletions FoodPoint/FoodPoint/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
path('register/', register, name="register"),
path('search/', search, name="search"),
path('User/getPoint', getPoint, name="getpoint"),

path('User/photoUpload', photoUpload, name="photoUpload"),
path('accounts/signup/', signup, name="signup"),
path('accounts/login/', login, name="login"),
path('accounts/logout', logout, name='logout'),
Expand All @@ -43,4 +43,4 @@
path('store/storeList', storeList, name='storeList'),
path('store/detail/<int:Store_id>', detail, name='detail'),

]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Binary file modified FoodPoint/Store/__pycache__/views.cpython-39.pyc
Binary file not shown.
19 changes: 7 additions & 12 deletions FoodPoint/Store/templates/registerStore-edit.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<!DOCTYPE html>
<html lang="en">

{% extends 'base.html'%}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% load static %}
{% block extrahead %}
<title>RegisterStore</title>
<link href="registerStore.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{% static 'registerStore.css' %}">
{% endblock %}
</head>

<body>
{% block content %}
<div class="register_container">
<div class="img_container">
<img class="logoImg" src="logo.png">
Expand All @@ -24,6 +21,4 @@
<button type="submit" id="confirmBtn">등록</button>
</form>
</div>
</body>

</html>
{% endblock %}
5 changes: 3 additions & 2 deletions FoodPoint/Store/templates/searchResult.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link rel="stylesheet" href="{% static 'searchResult.css' %}">
{% endblock %}
</head>

{% block content %}
<section id="search">
<input type="text" class="search_bar">
Expand All @@ -19,12 +20,12 @@

{% if user.is_authenticated %}
<div id="accountsbtn">
<button class="btn btn-outline-secondary"><a href="{% url 'logout' %}">로그아웃</a></button>
<button><a href="{% url 'logout' %}">로그아웃</a></button>
</div>
{% endif %}
{% if not user.is_authenticated %}
<div id="accountsbtn">
<button class="btn btn-outline-secondary"><a href="{% url 'login' %}">로그인</a></button>
<button><a href="{% url 'login' %}">로그인</a></button>
</div>
{% endif %}

Expand Down
16 changes: 8 additions & 8 deletions FoodPoint/Store/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def new(request):

def create(request):
new_Store=Store()
new_Store.Store_name=request.POST['Store_name']
new_Store.Store_tel=request.POST['Store_tel']
new_Store.Store_add=request.POST['Store_add']
new_Store.Store_num=request.POST['Store_num']
new_Store.Store_name=request.POST.get('Store_name', '')
new_Store.Store_tel=request.POST.get('Store_tel', '')
new_Store.Store_add=request.POST.get('Store_add', '')
new_Store.Store_num=request.POST.get('Store_num', '')
new_Store.author=request.user
new_Store.save()
return redirect('home')
Expand All @@ -37,9 +37,9 @@ def edit(request, Store_id): # 피드 수정 페이지 출력 함수

def update(request, Store_id): # 수정 함수 post로 db 수정
update_Store = Store.objects.get(id=Store_id)
update_Store.Store_name=request.POST['Store_name']
update_Store.Store_tel=request.POST['Store_tel']
update_Store.Store_add=request.POST['Store_add']
update_Store.Store_num=request.POST['Store_num']
update_Store.Store_name=request.POST.get('Store_name', '')
update_Store.Store_tel=request.POST.get('Store_tel', '')
update_Store.Store_add=request.POST.get('Store_add', '')
update_Store.Store_num=request.POST.get('Store_num', '')
update_Store.save()
return redirect('detail', update_Store.id)
Binary file modified FoodPoint/User/__pycache__/admin.cpython-39.pyc
Binary file not shown.
Binary file modified FoodPoint/User/__pycache__/apps.cpython-39.pyc
Binary file not shown.
Binary file modified FoodPoint/User/__pycache__/models.cpython-39.pyc
Binary file not shown.
Binary file modified FoodPoint/User/__pycache__/views.cpython-39.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions FoodPoint/User/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.3 on 2021-06-04 01:55
# Generated by Django 3.2.3 on 2021-06-04 07:17

from django.db import migrations, models

Expand All @@ -15,7 +15,7 @@ class Migration(migrations.Migration):
name='Post',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('photo', models.ImageField(blank=True, null=True, upload_to='User/')),
('photo', models.ImageField(blank=True, null=True, upload_to='photos/%m/%d')),
('user', models.CharField(max_length=100)),
('pub_date', models.DateTimeField()),
],
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion FoodPoint/User/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# Create your models here.

class Post(models.Model):
photo = models.ImageField(upload_to = "User/",blank = True, null = True)
photo = models.ImageField(upload_to = "photos/%m/%d",blank = True, null = True)
user = models.CharField(max_length = 100)
pub_date = models.DateTimeField()
16 changes: 12 additions & 4 deletions FoodPoint/User/templates/getpoint.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
<img class="restImg" src='empty.JPG' alt="잔반 사진을 올려주세요"/>
</div>
<div class="buttons">
<button class="gpBtn" id="selectImg" disabled>
<img src="cameraicon.png">
</button>
<button class="gpBtn" id="confirmBtn" disabled>승인 요청</button>
<form action="{%url 'photoUpload'%}" method="POST" enctype="multipart/form-data">

<button class="gpBtn" id="selectImg" disabled>
<img src="cameraicon.png">

{% csrf_token %}
<input type="file" name="image">

</button>
<button type="submit" class="gpBtn" id="confirmBtn">승인 요청</button>
</form>

</div>
</div>
{% endblock %}
7 changes: 4 additions & 3 deletions FoodPoint/User/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.shortcuts import render
from django.shortcuts import render,redirect,get_object_or_404
from django.utils import timezone
from .models import Post

Expand All @@ -9,7 +9,8 @@ def getPoint(request):
def photoUpload(request):
new_post = Post()
new_post.photo = request.FILES['image']
new_post.user = request.POST['user']
new_post.user = request.POST.get('user','')
new_post.pub_date = timezone.now()
new_post.save()


return redirect('home')
Binary file modified FoodPoint/db.sqlite3
Binary file not shown.
Binary file added FoodPoint/photos/06/04/regression.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FoodPoint/photos/06/04/theta.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/Image.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/TiffTags.cpython-39.pyc
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/_binary.cpython-39.pyc
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/_util.cpython-39.pyc
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/PIL/__pycache__/_version.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified myvenv/Lib/site-packages/asgiref/__pycache__/sync.cpython-39.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading