from flask import render_template
from app.forms.login import LoginForm
from app.forms.search import SearchForm

def render(*args, **kwargs):
    # TODO: debugguer cette merde : au logout, ça foire
    # if current_user.is_authenticated:
    #     login_form = LoginForm()
    #     return render_template(*args, **kwargs, login_form=login_form)
    # return render_template(*args, **kwargs)
    login_form = LoginForm()
    search_form = SearchForm()
    return render_template(*args, **kwargs,
        login_form=login_form, search_form=search_form)