I want to change in my django administration page the form of a field. In my model I have the 'user' as foreign key to another model. When I create a new ' programare ' in the administration page the default form-field for user it's a dropdown with all entries of ' Cont ' model. It's dizzy to search the right one, so I want to change that dropdown with a plain-text input or an autocomplete form .
class Programare(models.Model):
user = models.ForeignKey(to=Cont, on_delete=models.CASCADE, related_name='programari')
...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.