Во вьюхе: class MotionPictureAddView(FormView): form_class = forms.AddMotionPictureForm template_name = 'motion_pictures/add.html' def form_valid(self, form): data = get_data.get_data(self.request.POST.get('imdb_link'), os.environ['OMDB_API'], os.environ['VIDEOCDN_API']) print(data) return HttpResponseRedirect(models.MotionPicture.get_absolute_url(data.get('id')))
Обсуждают сегодня