Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11419 closed (fixed)

Minor typo on admin dev docs?

Reported by: jspeis Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords: minor typo
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


class MyModelAdmin(admin.ModelAdmin):
    def formfield_for_foreignkey(self, db_field, request, **kwargs):
        if == "car":
            kwargs["queryset"] = Car.object.filter(owner=request.user)
            return db_field.formfield(**kwargs)
        return super(MyModelAdmin, self).formfield_for_foreignkey(db_field, request, **kwargs)

Should this be:

            kwargs["queryset"] = Car.objects.filter(owner=request.user)

(changed object to objects)

Change History (3)

comment:1 Changed 6 years ago by jspeis

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [11176]) Fixed #11419 -- Corrected a minor typo in the admin docs. Thanks to jspeis for the report.

comment:3 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top