Re: ModelForm access slug from url

2017-02-06 Thread David
Sorted by using def get_form_kwargs(self): kwargs = super(EventForm, self).get_form_kwargs() kwargs.update({'category_slug': self.kwargs['category_slug']}) return kwargs -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: ModelForm access slug from url

2017-02-06 Thread David
I should add that this is in conjunction with a CreateView CBV. -- 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 pos