I have the following a form and model:
class Book(models.Model): name = models.CharField(max_length=128, null=True, blank=True) author = models.CharField(max_length=128, null=True, blank=True) borrower = models.ForeignKey('core.User')
class BookForm(forms.ModelForm) class Meta: model = Book fields = ("name", "author", "borrower")
In my website the user can borrow a book. Each book has its own borrower.
The problem is that the field “borrower” is translated into a html select, I would like to hide it and set it to the currently logged in user.
I would appreciate help implementing this