#27395: Allow generating '<link rel="alternate ... hreflang=...>" for sitemaps'
----------------------------------+------------------------------------
Reporter: Hovi | Owner: nobody
Type: New feature | Status: new
Component: contrib.sitemaps | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Comment (by Hendy Irawan):
Temporary workaround: https://github.com/barseghyanartur/django-qartez
It uses this usage pattern:
{{{
class ArticleSitemap(RelAlternateHreflangSitemap):
# If you want to serve the links on HTTPS.
protocol = 'https'
def alternate_hreflangs(self, obj):
return [('en-us', obj.alternative_object_url),]
def items(self):
return FooItem._default_manager.all()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27395#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.c204ce88a2c9a5c8489403ad2240b842%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.