mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
* add basic instrumentation possibilities to pretix * make tabs to spaces * apply flake8 * implement upstreams suggestions, round 1 * adjust naming of redis-connection * address noredis * add view for metrics * implement HTTP basic auth in front of metrics-endpoint * rename labelset * make flake8-clean * implement upstreams suggestions, round 2 * correct minor slipups * fix missing return * let isort add an empty line * implement test for counter * implement upstream suggestions, round 3 * correct typo * implement first test for view * finish view-test * fix deprecated keyword * implement upstream-suggestions, round 4 * implement test for gauge * test exceptions as well * add db-decorator
34 lines
997 B
Python
34 lines
997 B
Python
from django.conf import settings
|
|
from django.conf.urls import include, url
|
|
|
|
import pretix.control.urls
|
|
import pretix.presale.urls
|
|
|
|
from .base.views import cachedfiles, health, js_catalog, metrics, redirect
|
|
|
|
base_patterns = [
|
|
url(r'^download/(?P<id>[^/]+)/$', cachedfiles.DownloadView.as_view(),
|
|
name='cachedfile.download'),
|
|
url(r'^healthcheck/$', health.healthcheck,
|
|
name='healthcheck'),
|
|
url(r'^redirect/$', redirect.redir_view, name='redirect'),
|
|
url(r'^jsi18n/(?P<lang>[a-zA-Z-_]+)/$', js_catalog.js_catalog, name='javascript-catalog'),
|
|
url(r'^metrics$', metrics.serve_metrics,
|
|
name='metrics'),
|
|
]
|
|
|
|
control_patterns = [
|
|
url(r'^control/', include((pretix.control.urls, 'control'))),
|
|
]
|
|
|
|
debug_patterns = []
|
|
if settings.DEBUG:
|
|
try:
|
|
import debug_toolbar
|
|
|
|
debug_patterns.append(url(r'^__debug__/', include(debug_toolbar.urls)))
|
|
except ImportError:
|
|
pass
|
|
|
|
common_patterns = base_patterns + control_patterns + debug_patterns
|