I return initial on the method on my code, I forgot to include it in the example.
I just repast to make sure it's clear class EventCreate(CreateView): model = Event def get_initial(self): initial = super(EventCreate, self).get_initial() initial['location'] = Location.objects.filter(user=self.request.user) return initial When I inspect the form with pdb I can see that initial is in the kwargs, but they are not anymore when the form gets created. On Mon, Feb 4, 2013 at 2:21 PM, Timster <timshaffe...@gmail.com> wrote: > You need to return initial from the method. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.