blob: 9423453208b2882eaa07dab641679addf7692519 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
from app import app
from flask import *
from flask_user import *
from flask_login import login_user, logout_user
from app.models import *
import flask_menu as menu
from flask.ext import markdown
from sqlalchemy import func
from werkzeug.contrib.cache import SimpleCache
from urllib.parse import urlparse
cache = SimpleCache()
@app.template_filter()
def domain(url):
return urlparse(url).netloc
# TODO: remove on production!
@app.route('/static/<path:path>')
def send_static(path):
return send_from_directory('static', path)
@app.route('/')
@menu.register_menu(app, '.', 'Home')
def home_page():
return render_template('index.html')
from . import users, githublogin, packages
|