Das erste Mal lernen Flask und ich versuche, die Dinge nach einem Tutorial zu bauen. Ich erhalte diese Nachricht in meinem Browser, wenn ich Eingabe dieser URL:Interner Server Fehler Flask
http://127.0.0.1:5000/index
127.0.0.1 - - [16/Jun/2014 19:37:41] "GET /index HTTP/1.1" 500 -
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
Ich bin nicht sicher, warum ich diese Störung erhalte. Könnte mir jemand helfen und mir sagen warum? Ich bin neu in Flasche und Web-Entwicklung
Code:
from flask import Flask, request, make_response, redirect, render_template
from flask.ext.script import Manager
from flask.ext.bootstrap import Bootstrap
app = Flask(__name__)
manager = Manager(app)
bootstrap = Bootstrap(app)
@app.route('/index')
def index():
return render_template('index.html')
@app.route('/user/<name>')
def user(name):
return render_template('user.html', name = name)
if __name__ == '__main__':
#app.run(debug = True)
manager.run()
index.html:
{% extends "base.html" %}
{% block title %} Index {% block title %}
{% block head %}
<!-- Uses super() to retain the original contents-->
{{ super() }}
<style type="text/css">
</style>
{% endblock %}
{% block body %}
<h1>Hello, World!</h1>
{% endblock %}
Das ist meine Projektstruktur ist:
/Flask_0_11
/templates
base.html
index.html
user.html
hello.py