Skip to content

Commit

Permalink
Fixed #11419 -- Corrected a minor typo in the admin docs. Thanks to j…
Browse files Browse the repository at this point in the history
…speis for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11176 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Jul 3, 2009
1 parent 36954a0 commit b96e55e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/ref/contrib/admin/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ return a subset of objects for this foreign key field based on the user::
class MyModelAdmin(admin.ModelAdmin):
def formfield_for_foreignkey(self, db_field, request, **kwargs):
if db_field.name == "car":
kwargs["queryset"] = Car.object.filter(owner=request.user)
kwargs["queryset"] = Car.objects.filter(owner=request.user)
return db_field.formfield(**kwargs)
return super(MyModelAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)

Expand Down

0 comments on commit b96e55e

Please sign in to comment.