티스토리 수익 글 보기
다프네와 함께 django를 사용하는 방법¶
Daphne is a pure-Python ASGI server for UNIX, maintained by members of the Django project. It acts as the reference server for ASGI.
다프네에서 djagno 작동¶
다프네가 설치되면 다프네 서버 프로세스를 시작하는 “다프네” 명령이 나온다. 간단히 말해, 다프네는 ASGI 애플리케이션 개체를 포함하는 모듈의 위치로 호출되어야 하며, 그 다음에 애플리케이션 이름이 콜론으로 구분됩니다.
For a typical Django project, invoking Daphne would look like:
daphne myproject.asgi:application
이로써 “127.0.0.1:8000”에 대한 청취가 시작된다. 프로젝트가 Python 경로에 있어야 합니다. “관리”와 동일한 디렉토리에서 이 명령을 실행해야 합니다.
Integration with runserver¶
Daphne provides a runserver command to serve your site under ASGI
during development.
This can be enabled by adding daphne to the start of your
INSTALLED_APPS and adding an ASGI_APPLICATION setting pointing
to your ASGI application object:
INSTALLED_APPS = [
"daphne",
...,
]
ASGI_APPLICATION = "myproject.asgi.application"
추가 정보
Support Django!
목차
도움말
- 자주 묻는 질문
- 공통적인 질문에 대한 답을 FAQ에서 찾아보세요.
- 색인, 모듈 색인, or 목차
- 특정한 주제에 대한 정보를 찾는데 유용합니다.
- Django Discord Server
- Join the Django Discord Community.
- Official Django Forum
- Join the community on the Django Forum.
- Ticket tracker
- 티켓 트래커를 통해 Django 혹은 Django 문서의 버그를 신고해주세요.
다운로드:
오프라인(Django 4.2):
HTML |
PDF |
ePub
Read the Docs 제공.