Giter VIP home page Giter VIP logo

parkreview's Introduction

ParkReview

공원과 산책, 다녀왔던 공원에 대한 리뷰기록을 할 수 있는 사이트입니다

parkreview's People

Contributors

kimhyunjee avatar dusunax avatar ryeong25 avatar jinguang-chou avatar

Watchers

 avatar

parkreview's Issues

mypage: 선택된 리뷰 버튼에 클래스 'active' 더하기

유저가 현재 보고 있는 페이지가 어디인지 알도록 도움을 주기 위해서
버튼에 배경색이 있는 클래스 'active'를 추가하였습니다.

중앙 상단의 "공원 버튼"은 active클래스를 동적으로 달고 있습니다.
선택한 리뷰 버튼은 구현이 안되네여

url에서 받아온 page Id 먹통

  • app.py에서 “경로/<데이터>”로 받아온 값 id 1
    DB에 저장된 id 1(숫자형)이 일치하지 않음

{% if pageId == review.parkId %}
  page에 맞는 리뷰 리스트만 출력
{% endif %}

과정

  1. HTML에 {{ pageId }} {{ review.parkId }}로 찍었을 때는 1 1 출력
  2. {% if pageId - review.parkId == 0 %}으로 같은 값 찾기 => 필터 되지 않음

이유

  • pageId의 자료형이 숫자형이 아님
  • HTML이나 터미널에서는 똑같은 1 1로 보인다.

해결

  • 받아온 데이터를 {% set pargeId = pageId | int %}로 자료형 변환

ModuleNotFoundError: No module named 'jwt' in Python

master에서 pull 해왔을 때 파이참에서 app.py 실행 불가할 때 오류메시지 중 ModuleNotFoundError 이 뜹니다
ex) No module named 'jwt'

구글링 시
https://ddangeun.tistory.com/104
https://bobbyhadz.com/blog/python-no-module-named-jwt
참고

저는 이렇게 해결했습니다
파이참 오른쪽 위에 보면 app하고 셀렉박스 있는데 거기서 구성편집에 pythone 인터프리터를 venv가 아니라 본인이 진행하고있는 프로젝트로 선택해줘야함
웹개발종합반 강의를 듣다보면 무조건 venv로 해야할거같아서 ( 그리고 휠을 더 내릴 수 있는지 몰랐습니다 프로젝트가 많아서 아래로 더 많았네요) 그렇게 했었네요

app.py 코드 중복 최소화를 위한 checklogin()

토큰을 필요로 하는 페이지 (메인/공원/개인) 호출시 마다
마이토큰 디코딩 후 html을 호출하는 코드가 중복되어 있음

image
image
예시 이미지

코드 중복을 최소화 하기 위해 라우팅 checklogin 에서 토큰 디코딩 작업 완료 후
payload값을 리턴하는 형태로 바꾸기

html <head> 코드 중복 최소화 작업

기존 html 코드는 개별 html 파일마다 거의 유사한 를 동일하게 가지고 있었습니다.
header부분 또한 동일 혹은 유사하게 사용하므로
{% include('header.html') %} 를 사용해

부분과 body>header 부분의 코드 중복을 최소화 했습니다.

mypage: 버튼(a태그) 클릭 불편함

부모보다 a링크(자식) 크기가 작아서 클릭이 잘 안됩니다.
버튼의 패딩을 없애니 버튼 크기가 달라지고
버튼(부모)을 클릭했을 때 자식 a에 trigger를 하려고
이벤트에 $(this).children('a').trigger('click')를 써봤는데 안 되는 것 같습니다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.