Javascript basics
This commit is contained in:
1 parent
f72ad06c6f
commit
f16ccf7905
13 files changed
+5166
-18
No files matched your search
@@ -1,9 +1,11 @@
|
||||
from couchpotato.core.auth import requires_auth
|
||||
from couchpotato.core.logger import CPLog
|
||||
from flask.app import Flask
|
||||
from flask.globals import request
|
||||
from flask.helpers import url_for
|
||||
from flask.module import Module
|
||||
from flask.templating import render_template
|
||||
from werkzeug.utils import redirect
|
||||
|
||||
app = Flask(__name__)
|
||||
log = CPLog(__name__)
|
||||
@@ -14,3 +16,9 @@ web = Module(__name__, 'web')
|
||||
@requires_auth
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(error):
|
||||
index_url = url_for('web.index')
|
||||
url = request.path[len(index_url):]
|
||||
return redirect(index_url + '#' + url)
|
||||
Reference in new issue
Block a user