Build an absolute URI with optional port. Port is omitted from URL if None (standard port for scheme).
(request, path)
| 1012 | |
| 1013 | |
| 1014 | def build_absolute_uri_with_port(request, path): |
| 1015 | """ |
| 1016 | Build an absolute URI with optional port. |
| 1017 | Port is omitted from URL if None (standard port for scheme). |
| 1018 | """ |
| 1019 | host, port = get_host_and_port(request) |
| 1020 | scheme = request.META.get("HTTP_X_FORWARDED_PROTO", request.scheme) |
| 1021 | if port: |
| 1022 | return f"{scheme}://{host}:{port}{path}" |
| 1023 | return f"{scheme}://{host}{path}" |
| 1024 | |
| 1025 | |
| 1026 | def send_notification_dismissed(notification_key): |
no test coverage detected