[ADDED] SITE_URL usage in templates

Instead of {{ request.scheme }}://{{request.get_host}}`
This commit is contained in:
Peter Pfeufer 2022-09-07 15:04:25 +02:00
parent 8d255fb720
commit 89ef4f4cbc
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27
4 changed files with 5 additions and 3 deletions

View File

@ -8,7 +8,7 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<meta property="og:title" content="{{ SITE_NAME }}"> <meta property="og:title" content="{{ SITE_NAME }}">
<meta property="og:image" content="{{ request.scheme }}://{{ request.get_host }}{% static 'allianceauth/icons/apple-touch-icon.png' %}"> <meta property="og:image" content="{{ SITE_URL }}{% static 'allianceauth/icons/apple-touch-icon.png' %}">
<meta property="og:description" content="Alliance Auth - An auth system for EVE Online to help in-game organizations manage online service access."> <meta property="og:description" content="Alliance Auth - An auth system for EVE Online to help in-game organizations manage online service access.">
{% include 'allianceauth/icons.html' %} {% include 'allianceauth/icons.html' %}

View File

@ -5,5 +5,6 @@ from .views import NightModeRedirectView
def auth_settings(request): def auth_settings(request):
return { return {
'SITE_NAME': settings.SITE_NAME, 'SITE_NAME': settings.SITE_NAME,
'SITE_URL': settings.SITE_URL,
'NIGHT_MODE': NightModeRedirectView.night_mode_state(request), 'NIGHT_MODE': NightModeRedirectView.night_mode_state(request),
} }

View File

@ -60,7 +60,7 @@
<i class="glyphicon glyphicon-list-alt"></i> <i class="glyphicon glyphicon-list-alt"></i>
</a> </a>
<a id="clipboard-copy" data-clipboard-text="{{ request.scheme }}://{{request.get_host}}{% url 'groupmanagement:request_add' group.id %}" class="btn btn-warning" title="{% translate "Copy Direct Join Link" %}"> <a id="clipboard-copy" data-clipboard-text="{{ SITE_URL }}{% url 'groupmanagement:request_add' group.id %}" class="btn btn-warning" title="{% translate "Copy Direct Join Link" %}">
<i class="glyphicon glyphicon-copy"></i> <i class="glyphicon glyphicon-copy"></i>
</a> </a>
</td> </td>

View File

@ -25,7 +25,8 @@
{% else %} {% else %}
<div class="alert alert-info" role="alert">{% blocktranslate %}Give this link to the line members{% endblocktranslate %}.</div> <div class="alert alert-info" role="alert">{% blocktranslate %}Give this link to the line members{% endblocktranslate %}.</div>
<div class="alert alert-info" role="alert"> <div class="alert alert-info" role="alert">
{{ request.scheme }}://{{ request.get_host }}{% url 'srp:request' completed_srp_code %}</div> {{ SITE_URL }}{% url 'srp:request' completed_srp_code %}
</div>
<div class="text-center"> <div class="text-center">
<a href="{% url 'srp:management' %}" class="btn btn-primary btn-lg">{% translate "Continue" %}</a> <a href="{% url 'srp:management' %}" class="btn btn-primary btn-lg">{% translate "Continue" %}</a>
</div> </div>