is it possible to change my display employe to a search block because when I select the numbers it displays a list which is not practical when I have a lot of numbers in my database.
add info to an existing employee
CodePudding user response:
You can define __str__()
method for your Employee
model, it result would be seen in admin dropdown
class Employee(models.Model):
first_name = models.CharField(max_length=50)
...
def __str__(self):
return self.first_name
CodePudding user response:
Try select2 widget, this should be more than enough for you.