#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 Pierre Sassoulas):

 Hello,

 There is `django-hreflang` that seem to do it properly. I just adapted it
 for django 2.0. Maybe we could integrate some or all of its functionality
 directly into django ?

 There is a lot of way to use it, see
 https://bitbucket.org/mverleg/django_hreflang/src/master/

 But I think if its intregrated in django is should be used like this :

 Add `django.(...).AddHreflangToResponse` to `MIDDLEWARE_CLASSES`

 Then in template :

 {{{
 {% load hreflang %}
 <head>
     {% hreflang_tags %}
 </head>
 }}}

 Hope this help.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27395#comment:11>
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.84ae2ef50906732bb99232342e10afec%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to