[Fixed]-Name is not defined in Django model

30👍

Move the definition of Venue before the definition of Event.
The reason is that Event references the Venue class in its ForeignKey relationship before Venue is defined.

Or you can do this:

venue = models.ForeignKey('Venue')

Leave a comment