Assume we have class Employee. I want to have a field which references a different instance of the same class.
Employee
How to write this? How about the followi
You can reference other models by name (using a string, including package), instead of by the class directly:
So, if your Employee class is in the hr app:
hr
class Employee(models.model): other_employee = models.ForeignKey('hr.models.Employee', null=True, blank=True)