Update assertion error to reference 'base_name' argument, not incorrect 'name' argument. Closes #933

This commit is contained in:
Tom Christie 2013-06-21 22:12:37 +01:00
parent f2e6af8975
commit 209b65f426

View File

@ -117,7 +117,7 @@ class SimpleRouter(BaseRouter):
if model_cls is None and queryset is not None: if model_cls is None and queryset is not None:
model_cls = queryset.model model_cls = queryset.model
assert model_cls, '`name` not argument not specified, and could ' \ assert model_cls, '`base_name` argument not specified, and could ' \
'not automatically determine the name from the viewset, as ' \ 'not automatically determine the name from the viewset, as ' \
'it does not have a `.model` or `.queryset` attribute.' 'it does not have a `.model` or `.queryset` attribute.'