Example #1
0
    def load_user():
        g.user = get_current_user()
        from gather.account.models import Account

        token = request.headers.get("token", None)
        if token:
            g.token_user = Account.query.filter_by(api_token=token).first()
        else:
            g.token_user = None
Example #2
0
    def load_user():
        g.user = get_current_user()
        from gather.account.models import Account

        token = request.headers.get("token", None)
        if token:
            g.token_user = Account.query.filter_by(api_token=token).first()
        else:
            g.token_user = None
Example #3
0
 def load_user():
     g.user = get_current_user()
     if "page" in request.args:
         page = request.args.get("page", 1)
         try:
             page = int(page)
         except:
             pass
         else:
             return redirect(url_for_other_page(page), 301)
Example #4
0
 def load_user():
     g.user = get_current_user()
     if "page" in request.args:
         page = request.args.get("page", 1)
         try:
             page = int(page)
         except:
             pass
         else:
             return redirect(url_for_other_page(page), 301)
Example #5
0
 def load_user():
     g.user = get_current_user()
Example #6
0
 def load_user():
     g.user = get_current_user()