Tag: web

  • Flask의 request

    Flask의 request는 PEP 567의 Context Variables을 Werkzeug의 LocalProxy로 구현한 객체입니다. Context Variables은 thread local을 개선합니다. This concept is similar to thread-local storage (TLS), but, unlike TLS, it also allows correctly keeping track of values per asynchronous task, e.g. asyncio.Task. https://peps.python.org/pep-0567/ LocalProxy는 매번 컨텍스트를 ContextVar.get() 을 사용할 필요 없이 마치 로컬 객체처럼 다루게 해줍니다. 아래 코드의 _request와…

  • responsive web using rem

    Using rem (default 16px), one can write web page containing html elements and texts in harmony. Default root element font size is 16px, but many users override it for better readability. Use of rem respects that. https://www.sitepoint.com/understanding-and-using-rem-units-in-css/ Setting default font size and browser zoom level are two different controls. Browser zoom scales up everything by…