forked from CGM_Public/pretix_original
Remove browserconfig.xml (#5280)
* Remove meta-elements * remove url-route
This commit is contained in:
committed by
GitHub
parent
f0212d910d
commit
090358833d
@@ -22,8 +22,6 @@
|
|||||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||||
<link rel="manifest" href="{% url "site.webmanifest" %}">
|
<link rel="manifest" href="{% url "site.webmanifest" %}">
|
||||||
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
||||||
<meta name="msapplication-TileColor" content="#3b1c4a">
|
|
||||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
|
||||||
<meta name="theme-color" content="#3b1c4a">
|
<meta name="theme-color" content="#3b1c4a">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -81,8 +81,6 @@
|
|||||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||||
<link rel="manifest" href="{% url "site.webmanifest" %}">
|
<link rel="manifest" href="{% url "site.webmanifest" %}">
|
||||||
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
<link rel="mask-icon" href="{% static "pretixbase/img/icons/safari-pinned-tab.svg" %}" color="#3b1c4a">
|
||||||
<meta name="msapplication-TileColor" content="#3b1c4a">
|
|
||||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
|
||||||
<meta name="theme-color" content="#3b1c4a">
|
<meta name="theme-color" content="#3b1c4a">
|
||||||
<meta name="referrer" content="origin">
|
<meta name="referrer" content="origin">
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,6 @@
|
|||||||
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
<link rel="icon" type="image/png" sizes="192x192" href="{% static "pretixbase/img/icons/android-chrome-192x192.png" %}">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
|
<link rel="apple-touch-icon" sizes="180x180" href="{% static "pretixbase/img/icons/apple-touch-icon.png" %}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta name="msapplication-TileColor" content="{{ settings.primary_color|default:"#3b1c4a" }}">
|
|
||||||
<meta name="msapplication-config" content="{% url "presale:browserconfig.xml" %}">
|
|
||||||
<meta name="theme-color" content="{{ settings.primary_color|default:"#3b1c4a" }}">
|
<meta name="theme-color" content="{{ settings.primary_color|default:"#3b1c4a" }}">
|
||||||
</head>
|
</head>
|
||||||
<body class="nojs" data-locale="{{ request.LANGUAGE_CODE }}" data-now="{% now "U.u" %}" data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}" data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}" data-currency="{{ request.event.currency }}">
|
<body class="nojs" data-locale="{{ request.LANGUAGE_CODE }}" data-now="{% now "U.u" %}" data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}" data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}" data-currency="{{ request.event.currency }}">
|
||||||
|
|||||||
@@ -235,6 +235,5 @@ organizer_patterns = [
|
|||||||
locale_patterns = [
|
locale_patterns = [
|
||||||
re_path(r'^locale/set$', pretix.presale.views.locale.LocaleSet.as_view(), name='locale.set'),
|
re_path(r'^locale/set$', pretix.presale.views.locale.LocaleSet.as_view(), name='locale.set'),
|
||||||
re_path(r'^robots.txt$', pretix.presale.views.robots.robots_txt, name='robots.txt'),
|
re_path(r'^robots.txt$', pretix.presale.views.robots.robots_txt, name='robots.txt'),
|
||||||
re_path(r'^browserconfig.xml$', pretix.presale.views.theme.browserconfig_xml, name='browserconfig.xml'),
|
|
||||||
path('widget/v<int:version>.<slug:lang>.js', pretix.presale.views.widget.widget_js, name='widget.js'),
|
path('widget/v<int:version>.<slug:lang>.js', pretix.presale.views.widget.widget_js, name='widget.js'),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ import time
|
|||||||
|
|
||||||
from django.contrib.staticfiles import finders
|
from django.contrib.staticfiles import finders
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.templatetags.static import static
|
|
||||||
from django.utils.http import http_date
|
from django.utils.http import http_date
|
||||||
from django.views.decorators.cache import cache_page
|
|
||||||
from django.views.decorators.gzip import gzip_page
|
from django.views.decorators.gzip import gzip_page
|
||||||
from django.views.decorators.http import condition
|
from django.views.decorators.http import condition
|
||||||
|
|
||||||
@@ -44,25 +42,6 @@ def _get_source_cache_key():
|
|||||||
return _source_cache_key
|
return _source_cache_key
|
||||||
|
|
||||||
|
|
||||||
@cache_page(3600)
|
|
||||||
def browserconfig_xml(request):
|
|
||||||
return HttpResponse(
|
|
||||||
"""<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<browserconfig>
|
|
||||||
<msapplication>
|
|
||||||
<tile>
|
|
||||||
<square150x150logo src="{}"/>
|
|
||||||
<square310x310logo src="{}"/>
|
|
||||||
<TileColor>#3b1c4a</TileColor>
|
|
||||||
</tile>
|
|
||||||
</msapplication>
|
|
||||||
</browserconfig>""".format(
|
|
||||||
static('pretixbase/img/icons/mstile-150x150.png'),
|
|
||||||
static('pretixbase/img/icons/mstile-310x310.png'),
|
|
||||||
), content_type='text/xml'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@gzip_page
|
@gzip_page
|
||||||
@condition(etag_func=lambda request, **kwargs: request.GET.get("version"))
|
@condition(etag_func=lambda request, **kwargs: request.GET.get("version"))
|
||||||
def theme_css(request, **kwargs):
|
def theme_css(request, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user