##// END OF EJS Templates
Don't show reply link in the tree view. Fixed thread diff test after the thread id parameter was moved to POST dict.
Don't show reply link in the tree view. Fixed thread diff test after the thread id parameter was moved to POST dict.

File last commit:

r1090:a66d091f default
r1196:fdd4e78e default
Show More
mixins.py
21 lines | 594 B | text/x-python | PythonLexer
PARAM_NEXT = 'next'
PARAMETER_METHOD = 'method'
class DispatcherMixin:
"""
This class contains a dispather method that can run a method specified by
'method' request parameter.
"""
def dispatch_method(self, *args, **kwargs):
request = args[0]
method_name = None
if PARAMETER_METHOD in request.GET:
method_name = request.GET[PARAMETER_METHOD]
elif PARAMETER_METHOD in request.POST:
method_name = request.POST[PARAMETER_METHOD]
if method_name:
return getattr(self, method_name)(*args, **kwargs)