top of page
  • Black Facebook Icon
  • Black Instagram Icon
  • Black Twitter Icon
Search

##HOT## Badrinath Ki Dulhania Movie In Hindi Free Download In Mp4

cigpentvihan1980







Category:2017 films Category:Indian filmsQ: TypeError: must be unicode or str, not list when uploading file with Django I have a model: class Message(models.Model): sender = models.ForeignKey(User) subject = models.CharField(max_length=50) body = models.TextField() timestamp = models.DateTimeField(default=datetime.now) and I have a view: @csrf_exempt def upload_image(request): if request.method == 'POST': form = ImageForm(request.POST, request.FILES) if form.is_valid(): form.save() return HttpResponse('Image uploaded successfully') else: form = ImageForm() return render_to_response('upload.html', {'form': form}) and forms.py from django import forms class ImageForm(forms.ModelForm): class Meta: model = Message fields = ['sender','subject', 'body', 'timestamp', 'thumbnail'] On the html template I have: {% csrf_token %} {{ form.subject }} {% for field in form %} {{ field }} {% endfor %} My problem is that I can't upload any files with this method. On my form I only have this: {{ field.subject }} And I have an error like this: TypeError: must be unicode or str, not list A: You have to write the form as be359ba680


Related links:

1 view0 comments

Recent Posts

See All

Comentarios


Thanks for submitting!

  • White Facebook Icon
  • White Instagram Icon
  • White Twitter Icon

Phone: 123-456-7890

Salon: 500 Terry Francois Street, San Francisco, CA 94158

© 2023 by Goddess Braids Salon. Proudly created with Wix.com

bottom of page