From 34acf6f2257bab54e3081ca8221bf72489ad0a1f Mon Sep 17 00:00:00 2001 From: alshain Date: Thu, 10 Feb 2011 21:18:55 +0100 Subject: [PATCH] Changes Flask initalization. --- couchpotato/__init__.py | 4 ++++ couchpotato/cli.py | 13 +++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/couchpotato/__init__.py b/couchpotato/__init__.py index e69de29b..d57b5747 100644 --- a/couchpotato/__init__.py +++ b/couchpotato/__init__.py @@ -0,0 +1,4 @@ +"""Couchpotato.""" +from flask import Flask + +app = Flask(__name__) diff --git a/couchpotato/cli.py b/couchpotato/cli.py index 8a025fc5..0a4d423b 100644 --- a/couchpotato/cli.py +++ b/couchpotato/cli.py @@ -1,11 +1,8 @@ -from flask import Flask +from couchpotato import app import argparse def cmd_couchpotato(): - app = Flask(__name__) - -# @app.route("/") -# def hello(): -# return "Hello World!" - - app.run(debug = True) + """Commandline entry point.""" + # Make sure views are imported and registered. + import couchpotato.views + app.run(debug=True)