[Answered ]-Django – RecursionError: maximum recursion depth exceeded while calling a Python object

1👍

The problem is very simple but I find it badly explained, you just have to add parenthesis when you call the get_route_display function. like this :

def __str__(self):
  return f"... {self.get_route_display()} ..."

PS: This function is automatically created from the "route" field in the model

Leave a comment