向django项目添加robots.txt和humans.txt的简单方法
django-cyborg的Python项目详细描述
向django项目添加robots.txt和humans.txt的简单方法
快速启动
安装django cyborg:
pip install django-cyborg
添加已安装的电子人应用程序:
INSTALLED_APPS=[ ... 'cyborg', ]
将电子人添加到您的url.py:
url(r'^', include('cyborg.urls')),
定制
要将自己的文本添加到robots.txt或humans.txt中,只需覆盖 相关模板。创建一个cyborg/robots.txt或cyborg/humans.txt 把它放在模板加载程序可以发现的地方。
运行测试
代码真的有用吗?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install -r requirements/test.txt (myenv) $ python runtests.py
历史记录
0.2.0(2015-12-08)
- pypi上的第一个版本。