Opened 8 years ago

Closed 8 years ago

#13422 closed (invalid)

NameError with Recursive Model

Reported by: jprafael@… Owned by: nobody
Component: Core (Other) Version: 1.1
Severity: Keywords: recursive model namerrror
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


When i try to create a double recursive model like:

class Cell(models.Model):
    pos = models.ForeignKey(Pos)

class Pos(models.Model):
    current_cell = models.ForeignKey(Cell)

i get "NameError: name 'Pos' is not defined"

Change History (1)

comment:1 Changed 8 years ago by anonymous

Resolution: invalid
Status: newclosed

This is expected behavior, not a bug. See the relevant documentation:

Please post further questions to the django-users mailing list or the Freenode #django IRC channel.

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