Change how we determine default 'grid key' for master views
This commit is contained in:
parent
43eb2f107f
commit
7dd19c6d87
|
@ -694,8 +694,10 @@ class MasterView(View):
|
||||||
Returns the unique key to be used for the grid, for caching sort/filter
|
Returns the unique key to be used for the grid, for caching sort/filter
|
||||||
options etc.
|
options etc.
|
||||||
"""
|
"""
|
||||||
# TODO: default here should probably come from route_prefix instead?
|
if hasattr(cls, 'grid_key'):
|
||||||
return getattr(cls, 'grid_key', '{0}s'.format(cls.get_normalized_model_name()))
|
return cls.grid_key
|
||||||
|
# default previously came from cls.get_normalized_model_name() but this is hopefully better
|
||||||
|
return cls.get_route_prefix()
|
||||||
|
|
||||||
def make_grid_kwargs(self, **kwargs):
|
def make_grid_kwargs(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue