Use text instead of html for robots.txt
This commit is contained in:
parent
fdf1bc4153
commit
7cddad10a9
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
import json
|
import json
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from flask import Flask, request, Response, abort, render_template
|
from flask import Flask, request, Response, abort, render_template, send_file
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from flask_migrate import Migrate
|
from flask_migrate import Migrate
|
||||||
import requests
|
import requests
|
||||||
|
@ -162,7 +162,7 @@ def random_quote():
|
||||||
|
|
||||||
@app.route('/robots.txt', methods=['GET'])
|
@app.route('/robots.txt', methods=['GET'])
|
||||||
def get_robots():
|
def get_robots():
|
||||||
return render_template('robots.txt')
|
return send_file('templates/robots.txt')
|
||||||
|
|
||||||
@app.route('/', methods=['GET'])
|
@app.route('/', methods=['GET'])
|
||||||
def list_quotes():
|
def list_quotes():
|
||||||
|
|
Loading…
Reference in a new issue