Code

#19003 closed Cleanup/optimization (invalid)

generic views: syntax error in example

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

Description

§ Generic views of objects

In Book class a reference to 'Author' instead of Author (Author class to be defined).

Attachments (0)

Change History (1)

comment:1 Changed 19 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

It's valid syntax: "If you need to create a relationship on a model that has not yet been defined, you can use the name of the model, rather than the model object itself"

https://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.