-
Notifications
You must be signed in to change notification settings - Fork 2
[과제3] 공통부분 처리 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
2-pi-r
wants to merge
10
commits into
main
Choose a base branch
from
common
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[과제3] 공통부분 처리 #18
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
082c6d8
Update application.py
d6bc5dc
공통부분 처리, 코드 정렬
4111117
공통부분 처리, 네비게이션 바 수정, 헤더 수정
bb4109a
불필요한 부분 삭제
fae10ef
hw1
junghk0115 63a50e8
11주차 hw1
junghk0115 9c85c72
HW01 02 03
charlottejruby 3a9683d
eliminate menuRegister
charlottejruby 8235b6c
eliminate menuRegister
charlottejruby 4cf48d1
eliminate menuRegister
charlottejruby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| ``` | ||
| ┌───────────────────────────────────────────────┐ | ||
| _ | ||
| __ _ ___ ___ _ __ _ __ ___ (_) ___ | ||
| / _` |/ _ \ / _ \| '__| '_ ` _ \ | |/ _ \ | ||
| | (_| | (_) | (_) | | | | | | | |_| | (_) | | ||
| \__, |\___/ \___/|_| |_| |_| |_(_)_|\___/ | ||
| |___/ | ||
| 🌩 𝘼𝙣𝙮𝙤𝙣𝙚 𝙘𝙖𝙣 𝙙𝙚𝙫𝙚𝙡𝙤𝙥! | ||
| └───────────────────────────────────────────────┘ | ||
| ``` | ||
|
|
||
| # goormIDE | ||
| Welcome to goormIDE! | ||
|
|
||
| goormIDE is a powerful cloud IDE service to maximize productivity for developers and teams. | ||
| **DEVELOP WITH EXCELLENCE** | ||
|
|
||
| `Happy coding! The goormIDE team` | ||
|
|
||
|
|
||
| ## 🔧 Tip & Guide | ||
|
|
||
| * Command feature | ||
| * You can simply run your script using the shortcut icons on the top right. | ||
| * Check out `PROJECT > Common/Build/Run/Test/Find Command` in the top menu. | ||
|
|
||
| * Get URL and Port | ||
| * Click `PROJECT > URL/PORT` in top menu bar. | ||
| * You can get default URL/Port and add URL/Port in the top menu. | ||
|
|
||
| * Useful shortcut | ||
|
|
||
| | Shortcuts name | Command (Mac) | Command (Window) | | ||
| | ------------------ | :-----------: | :--------------: | | ||
| | Copy in Terminal | ⌘ + C | Ctrl + Shift + C | | ||
| | Paste in Terminal | ⌘ + V | Ctrl + Shift + V | | ||
| | Search File | ⌥ + ⇧ + F | Alt + Shift + F | | ||
| | Terminal Toggle | ⌥ + ⇧ + B | Alt + Shift + B | | ||
| | New Terminal | ⌥ + ⇧ + T | Alt + Shift + T | | ||
| | Code Formatting | ⌥ + ⇧ + P | Alt + Shift + P | | ||
| | Show All Shortcuts | ⌘ + H | Ctrl + H | | ||
|
|
||
| ## 💬 Support & Documentation | ||
|
|
||
| Visit [https://ide.goorm.io](https://ide.goorm.io) to support and learn more about using goormIDE. | ||
| To watch some usage guides, visit [https://help.goorm.io/en/goormide](https://help.goorm.io/en/goormide) |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| from flask import Flask, render_template, request | ||
| from database import DBhandler | ||
| import sys | ||
| application = Flask(__name__) | ||
|
|
||
| DB = DBhandler() | ||
|
|
||
|
|
||
| @application.route("/") | ||
| def hello(): | ||
| return render_template("list.html") | ||
|
|
||
| @application.route("/index") | ||
| def view_list(): | ||
| return render_template("list.html") | ||
|
|
||
| @application.route("/restaurantRegister") | ||
| def view_restaurantRegister(): | ||
| return render_template("restaurantRegister.html") | ||
|
|
||
| @application.route("/detail") | ||
| def view_detail(): | ||
| return render_template("detail.html") | ||
|
|
||
| @application.route("/menuRegister", methods=['POST']) | ||
| def reg_menu(): | ||
| data=request.form | ||
| print(data) | ||
| return render_template("menuRegister.html", data=data) | ||
|
|
||
|
|
||
| #@application.route("/menuRegister") | ||
| #def view_menuRegister(): | ||
| #return render_template("menuRegister.html") | ||
|
|
||
|
|
||
| @application.route("/menuView") | ||
| def view_menuView(): | ||
| return render_template("menuView.html") | ||
|
|
||
| @application.route("/reviewRegister") | ||
| def view_reviewRegister(): | ||
| return render_template("reviewRegister.html") | ||
|
|
||
| @application.route("/reviewView") | ||
| def view_reviewView(): | ||
| return render_template("reviewView.html") | ||
|
|
||
| @application.route("/worldCup") | ||
| def view_worldCup(): | ||
| return render_template("worldCup.html") | ||
|
|
||
|
|
||
| #아래는 과제2 (11/15마감) 제출용 페이지들 | ||
| @application.route("/menuSubmit", methods=['POST']) | ||
| def view_menuSubmit(): | ||
| global idx | ||
| image_file=request.files["img"] | ||
| image_file.save("./static/image/{}".format(image_file.filename)) | ||
| data=request.form | ||
|
|
||
| if DB.insert_menu(data['foodname'], data, image_file.filename): | ||
| return render_template("menuResult.html", data=data, image_path="static/image/"+image_file.filename) | ||
| else: | ||
| return "Menu name is already exist." | ||
|
|
||
|
|
||
| @application.route("/restaurantSubmit", methods=['POST']) | ||
| def view_restaurantSubmit(): | ||
| global idx | ||
| image_file=request.files["file"] | ||
| image_file.save("./static/image/{}".format(image_file.filename)) | ||
| data=request.form | ||
|
|
||
| if DB.insert_restaurant(data['name'], data, image_file.filename): | ||
| return render_template("result.html", data=data, image_path="static/image/"+image_file.filename) | ||
| else: | ||
| return "Restaurant name already exist!" | ||
|
|
||
| @application.route("/reviewSubmit", methods=['POST']) | ||
| def view_reviewSubmit(): | ||
| image_file=request.files["img"] | ||
| image_file.save("./static/image/{}".format(image_file.filename)) | ||
| data=request.form | ||
|
|
||
| if DB.insert_review(data['reviewerName'], data, image_file.filename): | ||
| return render_template("reviewResult.html", data=data, image_path="static/image/"+image_file.filename) | ||
| else: | ||
| return "Enter the review!" | ||
|
|
||
|
|
||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| application.run(host='0.0.0.0', debug=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "apiKey": "AIzaSyCfh1j3Z-STWZC2JCoPBvFAmaF2WPSf15Q", | ||
| "authDomain": "ewha-diner.firebaseapp.com", | ||
| "databaseURL": "https://ewha-diner-default-rtdb.firebaseio.com", | ||
| "projectId": "ewha-diner", | ||
| "storageBucket": "ewha-diner.appspot.com", | ||
| "messagingSenderId": "907261550992", | ||
| "appId": "1:907261550992:web:eca71177457cdd65d95315", | ||
| "measurementId": "G-SBFM91TPM1" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| import pyrebase | ||
| import json | ||
|
|
||
| class DBhandler: | ||
| def __init__(self): | ||
| with open('./authentication/firebase_auth.json') as f: | ||
| config=json.load(f) | ||
|
|
||
| firebase = pyrebase.initialize_app(config) | ||
| self.db = firebase.database() | ||
|
|
||
| #restaurant check | ||
| def restaurant_duplicate_check(self, name): | ||
| restaurants = self.db.child("restaurant").get() | ||
| for res in restaurants.each(): | ||
| if res.key()==name: | ||
| return False | ||
| return True | ||
|
|
||
|
|
||
| def insert_restaurant(self, name, data, img_path): | ||
| restaurant_info = { | ||
| "addr":data['addr'], | ||
| "tel":data['tel'], | ||
| "category":data['category'], | ||
| "money":data['money'], | ||
| "park":data['park'], | ||
| "time":data['time'], | ||
| "site":data['site'], | ||
| "img_path":img_path | ||
| } | ||
| if self.restaurant_duplicate_check(name): | ||
| self.db.child("restaurant").child(name).set(restaurant_info) | ||
| print(data, img_path) | ||
| return True | ||
| else: | ||
| return False | ||
|
|
||
| #menu check | ||
|
|
||
| def menu_duplicate_check(self, foodname): | ||
| menus = self.db.child("menu").get() | ||
| for res in menus.each(): | ||
| if res.key()==foodname: | ||
| return False | ||
| return True | ||
|
|
||
|
|
||
| def insert_menu(self, foodname, data, img_path): | ||
| menu_info = { | ||
| "restaurant":data['restaurantName'], | ||
| "foodprice":data['foodprice'], | ||
| "allergy":data['allergy'], | ||
| "vegan":data['vegan'], | ||
| "img_path":img_path | ||
| } | ||
| if self.menu_duplicate_check(foodname): | ||
| self.db.child("menu").child(foodname).set(menu_info) | ||
| print(data, img_path) | ||
| return True | ||
| else: | ||
| return False | ||
|
|
||
| #review check | ||
| def insert_review(self, reviewerName, data, img_path): | ||
| review_info = { | ||
|
|
||
| "menu":data['menu'], | ||
| "text":data['text'], | ||
| "rating":data['rating'], | ||
| "img_path":img_path | ||
| } | ||
| self.db.child("review").child(reviewerName).set(review_info) | ||
| print(data, img_path) | ||
| return True | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"author":"102210278618261545366_bg3ot_google","name":"flask_project","type":"python","detailedtype":"flask","description":"","date":"2022-11-13T08:22:30.000Z","plugins":{"goorm.plugin.python":[{"plugin.python.compiler_type":"python3","plugin.python.main":"application","plugin.python.source_path":"","plugin.python.run_on":"server","plugin.python.run_option":"$USER_PORT","plugin.python.log_path":"./server.log","name":"python"}]},"is_user_plugin":false,"storage":"container","project_domain":[{"id":"102210278618261545366_bg3ot_google","url":"ewhadiner.run.goorm.io","port":"5000"}],"show_preview_btn":true,"author_email":"charlottejruby@gmail.com","author_name":"Charlotte Nam","ignore_patterns":[],"visibility":1} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| 2176121 남승현, 2176123 남지민, 2176278 이원주, 2176349 정유라, 2176355 정혜교 | ||
|
|
||
| https://github.com/EwhaConan/yummy/tree/server/server/HW02 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| 2176121 남승현, 2176123 남지민, 2176278 이원주, 2176349 정유라, 2176355 정혜교 | ||
|
|
||
| https://github.com/EwhaConan/yummy/tree/server/server/HW01 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| * { | ||
| margin: 0; | ||
| padding: 0; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| body { | ||
| display: grid; | ||
| place-items: center; | ||
| height: 100vh; | ||
| background: #ffec94; | ||
| font-family: "Lato", sans-serif; | ||
| color: #2b2b2b; | ||
| } | ||
|
|
||
| a { | ||
| text-decoration: none; | ||
| color: #d33f2e; | ||
| font-size: 0.9rem; | ||
| } | ||
|
|
||
| .container { | ||
| width: 100%; | ||
| max-width: 800px; | ||
| height: 100%; | ||
| padding: 1em; | ||
| display: grid; | ||
| grid-template-rows: 800px 1fr; | ||
| -webkit-box-align: start; | ||
| align-items: start; | ||
| } | ||
|
|
||
| section { | ||
| width: 100%; | ||
| max-width: 800px; | ||
| height: 100%; | ||
| max-height: 800px; | ||
| position: relative; | ||
| } | ||
|
|
||
| .svg-content { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| } | ||
|
|
||
| footer { | ||
| padding: 1em 0 2em; | ||
| text-align: center; | ||
| display: grid; | ||
| place-items: center; | ||
| } | ||
| footer a { | ||
| margin-top: 20px; | ||
| } | ||
| footer div { | ||
| border: none; | ||
| outline: none; | ||
| width: 40px; | ||
| height: 40px; | ||
| background: #ffec94; | ||
| border-radius: 50%; | ||
| display: grid; | ||
| place-items: center; | ||
| cursor: pointer; | ||
| } | ||
| footer div svg { | ||
| width: 20px; | ||
| height: 20px; | ||
| fill: none; | ||
| stroke-width: 3; | ||
| stroke: #fff; | ||
| text-align: center; | ||
| } | ||
|
|
||
| @media (max-width: 580px) { | ||
| .container { | ||
| grid-template-rows: 1fr 30%; | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start3.html이 아무 url에서도 연결되지 않더라고.
그래서 아예 사용되질 않는데,
이거 start3.html 파일 아는 사람이 처리해줬으면 좋겠어!
혹시 빼기로 한 거면 아예 파일을 0temp폴더로 옮겨주면 좋을 것 같아.
일단 홈에는 list.html만 연결해놨어.