duck.backend.django.bridgeยถ
This module acts as a bridge between a Django server and a Duck server. It allows Django to handle requests that are originally meant for the Duck server.
Hereโs how it works:
Client sends a request: The client initiates a request to the Duck server.
Duck server receives request: The Duck server receives the request first.
Request forwarded to Django: The Duck server forwards the request to the Django server on the same network.
Django processes request: Django handles the request as if the route was defined within Duck urls.py or in Django itself.
Response sent to client: The response generated by Django is sent back to the client.
Module Contentsยถ
Functionsยถ
Executes essential Django management commands, usually makemigrations, migrate, and collectstatic. |
|
Starts the Django application server. |
APIยถ
- duck.backend.django.bridge.run_django_app_commands()ยถ
Executes essential Django management commands, usually makemigrations, migrate, and collectstatic.
This function ensures that the Django application is properly set up with the latest database schema and static files.
- duck.backend.django.bridge.start_django_server(host_addr: str, port: int, uses_ipv6: bool = False)ยถ
Starts the Django application server.
- Parameters:
host_addr โ The host address to bind the server to.
port โ The port to bind the server to.
uses_ipv6 โ Whether host on ipv6 address