启用基于django设置返回x-robots-tag头。
django-x-robots-tag-middleware的Python项目详细描述
基于配置参数使用X-Robots-Tag头的简单django中间件。
安装
来自pypi:
$ pip install django-x-robots-tag-middleware
或:
$ easy_install django-x-robots-tag-middleware
或从github:
克隆$ git clone git://github.com/cyface/django-x-robots-tag-middleware.git
用法
- 将'x_robots_middleware.XRobotsMiddleware',添加到settings.py中的中间件列表中。
- 将X_ROBOTS_TAG = ['noindex','nofollow']添加到settings.py中,并使用x_robots_标记所需的设置。
有关标记值及其作用的详细信息可以在in the Google Documentation中找到。