Remove *args from common.render_template. Just template_name.

This commit is contained in:
voussoir 2020-09-12 10:13:24 -07:00
parent d00d7b4acf
commit f7e5b639e3

View file

@ -138,7 +138,7 @@ def P_user(username):
def P_user_id(user_id): def P_user_id(user_id):
return P.get_user(id=user_id) return P.get_user(id=user_id)
def render_template(request, *args, **kwargs): def render_template(request, template_name, **kwargs):
session = session_manager.get(request) session = session_manager.get(request)
old_theme = request.cookies.get('etiquette_theme', None) old_theme = request.cookies.get('etiquette_theme', None)
@ -146,9 +146,9 @@ def render_template(request, *args, **kwargs):
theme = '' if new_theme == '' else new_theme or old_theme theme = '' if new_theme == '' else new_theme or old_theme
response = flask.render_template( response = flask.render_template(
template_name,
session=session, session=session,
theme=theme, theme=theme,
*args,
**kwargs, **kwargs,
) )