I want to use a form to generate a new object (say a Book) from a Person\'s page such that the new Book is automatically associated with that Person via a foreign key, but I
You're going at it the wrong way: the person is not user input, so this information should not reside in the form. You can override the form_valid method as follows:
class AddBook(CreateView):
model = Book
def form_valid(self, form):
form.instance.person_id = self.kwargs.get('pk')
return super(AddBook, self).form_valid(form)
This will set the person_id attribute on the instance used by the form to save the data, and then call the super method to save that instance and return a redirect.