web
-
inconsistent use of tabs and spaces in indentationweb/backend 2022. 4. 13. 10:44
Flask프레임워크를 사용하여 API 구현하기 위해 app.py에 아래와 같은 코드를 작성했다. @app.route('/tweet', methods=['POST']) def tweet(): payload = request.json user_id = int(payload['id']) tweet = payload['tweet'] if user_id not in app.users: return '사용자가 존재하지 않습니다.', 400 if len(tweet) > 300: return '300자를 초과했습니다', 400 user_id = int(payload['id']) app.tweets.append({ 'user_id' : user_id, 'tweet' : tweet }) 저장하고 API 콜을 했는데 오류가..
-
CSS #1web/CSS 2022. 3. 10. 20:06
CSS -> CSS(Cascading Style Sheets)는 HTML이나 XML과 같은 구조화 된 문서(Document)를 화면, 종이 등에 어떻게 렌더링할 것인지를 정의하기 위한 언어이다. 다시 말해, HTML의 각 요소(Element)의 style(design, layout etc)을 정의하여 화면(Screen) 등에 어떻게 렌더링하면 되는지 브라우저에게 설명하기 위한 언어이다. HTML과 CSS의 연동 Link style HTML에서 외부에 있는 CSS 파일을 로드하는 방식 Embedding style HTML 내부에 CSS를 포함시키는 방식 Hello World This is a web page. Inline style HTML요소의 style 프로퍼티에 CSS를 기술하는 방식 Hello Wo..