aboutsummaryrefslogtreecommitdiff
path: root/src/web/views/__init__.py
blob: 6de8381832d2208c2095456276b99e05876551fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from web.views import views, home, session_mgmt, api
from web.views.article import article_bp, articles_bp
from web.views.feed import feed_bp, feeds_bp
from web.views.category import category_bp, categories_bp
from web.views.icon import icon_bp
from web.views.admin import admin_bp
from web.views.user import user_bp, users_bp

__all__ = ['views', 'home', 'session_mgmt', 'api',
           'article_bp', 'articles_bp', 'feed_bp', 'feeds_bp',
           'category_bp', 'categories_bp', 'icon_bp',
           'admin_bp', 'user_bp', 'users_bp']

import conf
from flask import request
from flask import g

@g.babel.localeselector
def get_locale():
    return request.accept_languages.best_match(conf.LANGUAGES.keys())
bgstack15