* remove email verification related code * remove email verification related code * remove sendgrid callback * remove sendgrid related code * remove sendgrid related code * rename sendgrid app to email * remove email from built-in channels * remove email from built-in channels * remove email from built-in channels * add email backend: https://github.com/grafana/oncall/pull/50 * add email templater * add email templater * convert md to html * add email settings to live settings * use task to send email, handle some exceptions to create logs * remove ERROR_NOTIFICATION_MAIL_DELIVERY_FAILED usage * add email limit logic * fix tests * add docs * remove old email templates * remove old email templates * add template_fields to messaging backend * add messaging backends templates to public api * add comment for deprecated fields * fix test * fix tests * disable email by default * don't retry on SMTPException and TimeoutError * add tests * bring email back to public api docs * return ERROR_NOTIFICATION_MAIL_LIMIT_EXCEEDED * make template_fields tuple * build_subject_and_title -> build_subject_and_message * add one more comment about template deprecation * use 8 as backend id * add comment about gaierror and BadHeaderError * add comment on importing in notify_user_async * edit oss docs
69 lines
2.8 KiB
Python
69 lines
2.8 KiB
Python
"""engine URL Configuration
|
|
|
|
The `urlpatterns` list routes URLs to views. For more information please see:
|
|
https://docs.djangoproject.com/en/2.1/topics/http/urls/
|
|
Examples:
|
|
Function views
|
|
1. Add an import: from my_app import views
|
|
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
|
Class-based views
|
|
1. Add an import: from other_app.views import Home
|
|
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
|
Including another URLconf
|
|
1. Import the include() function: from django.urls import include, path
|
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
|
"""
|
|
from django.conf import settings
|
|
from django.conf.urls.static import static
|
|
from django.contrib import admin
|
|
from django.urls import include, path
|
|
|
|
from .views import HealthCheckView, ReadinessCheckView, StartupProbeView
|
|
|
|
urlpatterns = [
|
|
path("", HealthCheckView.as_view()),
|
|
path("health/", HealthCheckView.as_view()),
|
|
path("ready/", ReadinessCheckView.as_view()),
|
|
path("startupprobe/", StartupProbeView.as_view()),
|
|
# path('slow/', SlowView.as_view()),
|
|
# path('exception/', ExceptionView.as_view()),
|
|
path(settings.ONCALL_DJANGO_ADMIN_PATH, admin.site.urls),
|
|
path("api/gi/v1/", include("apps.api_for_grafana_incident.urls", namespace="api-gi")),
|
|
path("api/internal/v1/", include("apps.api.urls", namespace="api-internal")),
|
|
path("api/internal/v1/", include("social_django.urls", namespace="social")),
|
|
path("api/internal/v1/plugin/", include("apps.grafana_plugin.urls", namespace="grafana-plugin")),
|
|
path("api/internal/v1/", include("apps.grafana_plugin_management.urls", namespace="grafana-plugin-management")),
|
|
path("api/internal/v1/", include("apps.social_auth.urls", namespace="social_auth")),
|
|
path("integrations/v1/", include("apps.integrations.urls", namespace="integrations")),
|
|
path("twilioapp/", include("apps.twilioapp.urls")),
|
|
path("api/v1/", include("apps.public_api.urls", namespace="api-public")),
|
|
path("api/internal/v1/", include("apps.migration_tool.urls", namespace="migration-tool")),
|
|
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
|
|
|
if settings.FEATURE_SLACK_INTEGRATION_ENABLED:
|
|
urlpatterns += [
|
|
path("api/internal/v1/slack/", include("apps.slack.urls")),
|
|
]
|
|
|
|
if settings.FEATURE_TELEGRAM_INTEGRATION_ENABLED:
|
|
urlpatterns += [path("telegram/", include("apps.telegram.urls"))]
|
|
|
|
if settings.FEATURE_SLACK_INTEGRATION_ENABLED:
|
|
urlpatterns += [
|
|
path("slack/", include("apps.slack.urls")),
|
|
]
|
|
|
|
if settings.OSS_INSTALLATION:
|
|
urlpatterns += [
|
|
path("api/internal/v1/", include("apps.oss_installation.urls")),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
import debug_toolbar
|
|
|
|
urlpatterns = [
|
|
path("__debug__/", include(debug_toolbar.urls)),
|
|
] + urlpatterns
|
|
|
|
|
|
admin.site.site_header = settings.ADMIN_SITE_HEADER
|