aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/__init__.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-03-04 07:48:14 +0100
committerCédric Bonhomme <kimble.mandel+bitbucket@gmail.com>2015-03-04 07:48:14 +0100
commit1c0ba8fad47489ce987e628605fd106f981d8075 (patch)
treeb381e4c8c910b2f2f282f6dadbda1a8c1938e358 /pyaggr3g470r/__init__.py
parentTypo. (diff)
parentadding refresh rate to the profile form (diff)
downloadnewspipe-1c0ba8fad47489ce987e628605fd106f981d8075.tar.gz
newspipe-1c0ba8fad47489ce987e628605fd106f981d8075.tar.bz2
newspipe-1c0ba8fad47489ce987e628605fd106f981d8075.zip
Merged in jaesivsm/pyaggr3g470r/evol/api (pull request #6)
Evolution Arch, API and new crawler
Diffstat (limited to 'pyaggr3g470r/__init__.py')
-rw-r--r--pyaggr3g470r/__init__.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py
index f3f784f4..e69de29b 100644
--- a/pyaggr3g470r/__init__.py
+++ b/pyaggr3g470r/__init__.py
@@ -1,48 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import os
-from flask import Flask
-from flask.ext.sqlalchemy import SQLAlchemy
-from flask.ext.babel import Babel
-from flask.ext.babel import format_datetime
-
-import conf
-
-# Create Flask application
-app = Flask(__name__)
-app.debug = conf.WEBSERVER_DEBUG
-
-# Create dummy secrey key so we can use sessions
-app.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None)
-if not app.config['SECRET_KEY']:
- app.config['SECRET_KEY'] = os.urandom(12)
-app.config['SQLALCHEMY_DATABASE_URI'] = conf.SQLALCHEMY_DATABASE_URI
-db = SQLAlchemy(app)
-
-app.config['RECAPTCHA_USE_SSL'] = True
-app.config['RECAPTCHA_PUBLIC_KEY'] = conf.RECAPTCHA_PUBLIC_KEY
-app.config['RECAPTCHA_PRIVATE_KEY'] = conf.RECAPTCHA_PRIVATE_KEY
-
-if conf.ON_HEROKU:
- from flask_sslify import SSLify
- sslify = SSLify(app)
-
-ALLOWED_EXTENSIONS = set(['xml', 'opml', 'json'])
-
-def allowed_file(filename):
- """
- Check if the uploaded file is allowed.
- """
- return '.' in filename and \
- filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS
-
-babel = Babel(app)
-
-app.jinja_env.filters['datetime'] = format_datetime
-
-# Views
-from flask.ext.restful import Api
-api = Api(app)
-
-from pyaggr3g470r import views, rest
bgstack15