Compare commits

..

3 Commits

Author SHA1 Message Date
Martin Quarda
c5fa34446e fix zaloha.alkator.cz/admin 2024-10-30 15:59:45 +01:00
Martin Quarda
1fd44949eb maybe fix? 2024-10-30 15:57:27 +01:00
Martin Quarda
a280cabff1 metrics 2024-10-30 08:04:52 +01:00
2 changed files with 10 additions and 3 deletions

View File

@ -27,7 +27,7 @@ DEBUG = False
ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1', 'api', 'https://alkator.cz', 'https://beta.alkator.cz', 'localhost']
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz']
CSRF_TRUSTED_ORIGINS = ['https://alkator.cz', 'https://beta.alkator.cz', 'https://zaloha.alkator.cz']
# Application definition
@ -40,9 +40,11 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'alkatorapi',
'django_prometheus',
]
MIDDLEWARE = [
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
@ -50,8 +52,12 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware',
]
PROMETHEUS_LATENCY_BUCKETS = (0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 25.0, 50.0, 75.0, float("inf"),)
ROOT_URLCONF = 'alkator.urls'
TEMPLATES = [
@ -80,7 +86,7 @@ SESSION_COOKIE_SECURE = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'ENGINE': 'django_prometheus.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}

View File

@ -15,7 +15,7 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
from alkatorapi.views import (
register_user, register_racer,
login, logout,
@ -51,4 +51,5 @@ urlpatterns = [
path('api/cart/select_delivery', select_delivery),
path('api/cart/delivery', delivery),
path('api/forgotten_password', forgotten_password),
path('', include('django_prometheus.urls')),
]