I created a model with a foreign key in it:
class Book(models.Model):
library = models.ForeignKey(Library, null=False, blank=False)
...
and then I created a form with a ModelForm to display to the users:
class BookSubmitForm(ModelForm):
class Meta:
model = Book
and when I display the page with the form I get the Library choices but also the blank (--------) choice that comes by default.
I thought by having null=False and blank=False in the model that would get rid of that blank choice in the ModelForm but no. What can I do to only have actual choices in the list and not that one?