#18351: Sitemaps should use the X-Robots-Tag HTTP header
-------------------------------------+-------------------------------------
     Reporter:  mlissner             |                    Owner:  mlissner
         Type:  New feature          |                   Status:  assigned
    Component:  Core (Other)         |                  Version:  1.4
     Severity:  Normal               |               Resolution:
     Keywords:  decorator,           |             Triage Stage:  Ready for
  sitemap.xml, robots                |  checkin
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by agestart@…):

 * keywords:   => decorator, sitemap.xml, robots
 * has_patch:  1 => 0


Comment:

 may be this decorator?

 {{{
 from django.utils.functional import wraps

 def x_robots_tag(func):
     def inner(request, *args, **kwargs):
         responce = func(request, *args, **kwargs)
         responce['X-Robots-Tag'] = 'noindex, noodp, noarchive'
         return responce
     return wraps(func)(inner)


     url('^sitemap\.xml$', x_robots_tag(index), {'sitemaps': sitemaps}),
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18351#comment:6>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to