Enable django.contrib.sites rather than using a custom lemoncurry-specific setting for the site name
This commit is contained in:
parent
7429d43280
commit
c354830653
5 changed files with 12 additions and 15 deletions
|
@ -19,7 +19,7 @@ def add_links(request, dest):
|
|||
def host_meta(request):
|
||||
h = XRD()
|
||||
h.attributes.append(Attribute('xmlns:hm', 'http://host-meta.net/ns/1.0'))
|
||||
h.elements.append(Element('hm:Host', request.META['HTTP_HOST']))
|
||||
h.elements.append(Element('hm:Host', request.site.domain))
|
||||
add_links(request, h.links)
|
||||
return h
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from django.conf import settings
|
||||
from django.http import JsonResponse
|
||||
from django.urls import reverse
|
||||
from favicon.models import FaviconImg
|
||||
|
@ -10,12 +9,11 @@ from textwrap import shorten
|
|||
|
||||
def manifest(request):
|
||||
base = utils.origin(request)
|
||||
name = settings.LEMONCURRY_SITE_NAME
|
||||
start_url = reverse('home:index') + '?utm_source=homescreen'
|
||||
|
||||
app = {
|
||||
'name': name,
|
||||
'short_name': shorten(name, width=20, placeholder=''),
|
||||
'name': request.site.name,
|
||||
'short_name': shorten(request.site.name, width=20, placeholder=''),
|
||||
|
||||
'display': 'browser',
|
||||
'start_url': urljoin(base, start_url),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue