Skip to content

Commit 7932f2c

Browse files
committed
Merge pull request #2899 from maryokhin/patch-3
Fix Invalid keyword model with generic views
2 parents abcd6f2 + d19c3cc commit 7932f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/generic-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ For more complex cases you might also want to override various methods on the vi
5151

5252
For very simple cases you might want to pass through any class attributes using the `.as_view()` method. For example, your URLconf might include something like the following entry:
5353

54-
url(r'^/users/', ListCreateAPIView.as_view(model=User), name='user-list')
54+
url(r'^/users/', ListCreateAPIView.as_view(queryset=User.objects.all(), serializer_class=UserSerializer), name='user-list')
5555

5656
---
5757

0 commit comments

Comments
 (0)