diff --git a/hackens_orga/agent/models.py b/hackens_orga/agent/models.py index 1bb8c1a..0ef5b6e 100644 --- a/hackens_orga/agent/models.py +++ b/hackens_orga/agent/models.py @@ -6,5 +6,8 @@ class Agent(models.Model): name = models.CharField(max_length=255) user = models.OneToOneField(User, on_delete=models.CASCADE, null=True) - def __str__(self): + def __repr__(self): return f"Agent_{self.name}" + + def __str__(self): + return self.name diff --git a/hackens_orga/budget/models.py b/hackens_orga/budget/models.py index e2ba0f2..a30ef4a 100644 --- a/hackens_orga/budget/models.py +++ b/hackens_orga/budget/models.py @@ -14,6 +14,9 @@ class BudgetLine(models.Model): title = models.CharField(max_length=255) def __str__(self): + return f"{self.title}" + + def __repr__(self): return f"BudgetLine_{self.title}_{self.amount}€" @@ -25,4 +28,7 @@ class BudgetGroup(models.Model): return sum(i.amount for i in self.budgetline_set.all()) def __str__(self): + return f"{self.name}" + + def __repr__(self): return f"BudgetGroup_{self.name}"