Added robots.txt
This commit is contained in:
parent
8c33ea85b5
commit
af96bdf2ac
2 changed files with 17 additions and 1 deletions
11
app.py
11
app.py
|
|
@ -1,5 +1,5 @@
|
|||
from modules.cuchulublog import cuchulublog_app
|
||||
from flask import request, g, url_for
|
||||
from flask import request, g, url_for, make_response
|
||||
from settings import config
|
||||
from paramecio2.libraries.mtemplates import PTemplate, env_theme
|
||||
from paramecio2.libraries.i18n import I18n
|
||||
|
|
@ -164,7 +164,16 @@ def send_contact():
|
|||
def cuchulublog_about():
|
||||
|
||||
return t.load_template('about.phtml', title=I18n.lang('cuchulublog', 'about', 'About'))
|
||||
|
||||
@cuchulublog_app.route('/robots.txt')
|
||||
def cuchulu_robots():
|
||||
|
||||
resp=make_response("User-Agent: *\nAllow: /")
|
||||
|
||||
resp.headers['Content-Type']='text/plain'
|
||||
|
||||
return resp
|
||||
|
||||
if config.default_module=="cuchulublog":
|
||||
|
||||
home=cuchulublog_app.route("/")(cuchulublog_home)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue