diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 89f6e524..611e59f5 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -694,8 +694,10 @@ class MasterView(View): Returns the unique key to be used for the grid, for caching sort/filter options etc. """ - # TODO: default here should probably come from route_prefix instead? - return getattr(cls, 'grid_key', '{0}s'.format(cls.get_normalized_model_name())) + if hasattr(cls, 'grid_key'): + 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): """