Programming321 무료 간트 차트 라이브러리 Gantt chart library ourcodeworld.com/articles/read/434/top-5-best-free-jquery-and-javascript-dynamic-gantt-charts-for-web-applications 2020. 12. 2. Flask강좌4 - Flask_SQLAlchemy MySQL연동 이번 강좌에서는 ORM 방식으로 Database와 연동하는 방법에 대해 포스팅하겠습니다. ORM은 Object-Relational Mapping 이라고 하여, Database 객체를 객체지향 프로그래밍 언어로 변환하는 기법입니다. (자세한 내용은 다른 포스팅들을 참조하시기 바랍니다.) 그 중에서도 Flask에서 ORM을 구현할 수 있게 해주는 라이브러리가 Flask-SQLAlchemy 입니다. 이 Flask-SQLAlchemy를 이용하여 MySql과 연동해보도록 하겠습니다. 1. Database 자료 생성 아래와 같이 id, name, email, phone, start(datetime), end(datetime)을 필드로 하는 자료를 생성해놓습니다. 2. 라이브러리 설치 먼저 말했듯이 이번 강좌의 메인.. 2020. 12. 2. Flask강좌3 - Request 1. Request Event Handler 주요 Request Event Handler(Web Filter)는 아래와 같습니다. @app.before_first_requst : 첫번째 요청을 부를 때 @app.before_request : 매 요청에 대해 router가 받아서 모델이 처리하기 전에 @app.after_request : 응답이 나가기 직전에 (DB Close와 같은 작업 처리) @app.teardown_request : 응답이 나가고 나서 @app.teardown_appcontext : application Context가 끝났을 때 2. Request Parameter # GET request.args.get('q') .....> q파라미터를 GET으로 받음 # POST request... 2020. 12. 1. Flask강좌2 - Global Object: g, Response객체 1. __init__.py 수정 from flask import Flask, g, Response, make_response app = Flask(__name__) app.debug = True #use only debug!! @app.before_request def before_request(); print("before_request!!!") g.str = "한글" @app.route("/gg") def helloworld(): return "Hello World!" +getattr(g, 'str', '111') @app.route("/") def helloworld(): return "Hello Flask World!!!!!!!" @app.route("/res1") def res1(): custo.. 2020. 12. 1. Flask강좌1 - hello flask! 설치 pip install flask 셋업 webapp (Web application) /helloflask(Web context영역, blog 등) - /static -/css -/images -/js -/templates -application.html -__init__.py (임포트 하는 순간 자동 실행 됨) start_helloflask.py __init__.py from flask import Flask app = Flask(__name__) @app.route("/") def helloworld(): return "Hello Flask!" start_helloflask.py #../start_flask.py from helloflask import app app.run(host='localho.. 2020. 12. 1. Spring boot 시작하기 - 14강(스프링데이터JPA) 1. SpringDataJpaMemberRepository 인터페이스 작성 이번엔 클래스가 아닌 인터페이스를 만들어줍니다. 인터페이스만 만들면 객체는 JPA 템플릿이 자동으로 생성해준다고 합니다. package hello.hellospring.repository; import hello.hellospring.domain.Member; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; public interface SpringDataJpaMemberRepository extends JpaRepository, MemberRepository { @Override Optional findByName(St.. 2020. 11. 30. 이전 1 ··· 31 32 33 34 35 36 37 ··· 54 다음