Django file upload with UpdateView
问题 I tried a minimalistic django implementation of generic views to upload profile pictures. views.py class UpdateProfile(UpdateView): form_class = UpdateUserProfileForm model = UserProfile success_url = reverse_lazy('show_profile') models.py class UserProfile(models.Model): user = models.OneToOneField(User) website = models.URLField(blank=True) picture = models.ImageField(upload_to='user/img/%Y-%m-%d/', blank=True) forms.py class UpdateUserProfileForm(forms.ModelForm): class Meta: model =