Re: How to save user to foreignKey field for new records in modelFormset case?

2015-03-06 Thread Collin Anderson
Hi, The form doesn't have access to the current user. I'd attach it using the view. Thanks, Collin On Wednesday, February 25, 2015 at 3:53:40 AM UTC-5, Mike wrote: > > Hi, > I have created modelFormset using SchoolHistory model and SchoolForm form. > > "SchoolFormSet =

How to save user to foreignKey field for new records in modelFormset case?

2015-02-25 Thread Mike
Hi, I have created modelFormset using SchoolHistory model and SchoolForm form. "SchoolFormSet = modelformset_factory(SchoolHistory, form=SchoolForm)" I get other content from Form, but should save current user to SchoolHistory model too. user=models.ForeignKey(User) school_name =