Dramatically improve AMP support, adding all the missing fields so that the AMP version still parses to a reasonable h-entry

This commit is contained in:
Danielle McLean 2018-01-24 14:02:12 +11:00
parent 75e08aa1b2
commit e5a44fd38c
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
2 changed files with 80 additions and 3 deletions

View file

@ -0,0 +1,10 @@
from django import template
from urllib.parse import urljoin
from ..utils import origin
register = template.Library()
@register.simple_tag(takes_context=True)
def absolute_url(context, url):
return urljoin(origin(context.request), url)