title: AttributeError: 'str' object has no attribute 'days'
body: <blockquote>
  <p>when I try to add an item to a vendor it calls the <strong>POST</strong> method when this *view is called it shows an error that <strong>'str' object has no attribute 'days'.</strong> if you want any other files to tell I hope someone will fix this issue.</p>
  </blockquote>
  <pre><code>class AddBaseproductToStore(AdminOnlyMixin, generic.TemplateView):
  template_name = 'vendor-admin/add-product-to-store.html'
  
  def get_context_data(self, **kwargs):
      # Call the base implementation first to get a context
      context = super().get_context_data(**kwargs)
      context['prod_id'] = self.kwargs['pk']
      context['vendor'] = self.kwargs['vendor']
      return context
  
  def get(self, request, *args, **kwargs):
      product = BaseProduct.objects.get(id=self.kwargs['pk'])
      vendor_id = self.kwargs['vendor']
      base_cat = BaseCategory.objects.all()
      return render(request, self.template_name, {&quot;product&quot;: product, &quot;base_cat&quot;: base_cat, 'vendor': vendor_id})
  </code></pre>
  <p>this the continuation of above code</p>
  <pre><code>    def post(self, request, *args, **kwargs):
      base_product = BaseProduct.objects.get(id=self.kwargs['pk'])
      vendor_id = self.kwargs['vendor']
      base_category = BaseCategory.objects.get(id=request.POST.get('category'))
      try:
          p = Product.objects.get(base_product=base_product,
                                  category=Category.objects.get(vendor_id=vendor_id, base_category=base_category))
      except ObjectDoesNotExist:
          product = Product()
          product.category = Category.objects.get(vendor_id=vendor_id, base_category=base_category)
          product.base_product = base_product
          product.name = request.POST.get('name')
          product.ar_name = request.POST.get('ar_name')
          product.sort_order = request.POST.get('sort-order')
  
          product.dryclean = request.POST.get('dryclean', '') == 'on'
          product.normal_dryclean_price = request.POST.get('dryclean_price')
          product.normal_dryclean_buffer_time = request.POST.get('dryclean_buffer')
  
          product.wash_and_pressing = request.POST.get('wash-press', '') == 'on'
          product.normal_wash_and_pressing_price = request.POST.get('wash-press-price')
          product.normal_wash_and_pressing_buffer_time = request.POST.get('wash-press-buffer')
  
          product.pressing = request.POST.get('press', '') == 'on'
          product.normal_pressing_price = request.POST.get('press-price')
          product.normal_pressing_buffer_time = request.POST.get('press-buffer')
  
          product.express_dryclean = request.POST.get('exp-dryclean', '') == 'on'
          product.express_dryclean_price = request.POST.get('exp-dryclean-price')
          product.express_dryclean_buffer_time = request.POST.get('exp-dryclean-buffer')
  
          product.express_wash_and_pressing = request.POST.get('exp-wash-press', '') == 'on'
          product.express_wash_and_pressing_price = request.POST.get('exp-wash-press-price')
          product.express_wash_and_pressing_buffer_time = request.POST.get('exp-wash-press-buffer')
  
          product.express_pressing = request.POST.get('exp-press', '') == 'on'
          product.express_pressing_price = request.POST.get('exp-press-price')
          product.express_pressing_buffer_time = request.POST.get('exp-press-buffer')
  
          product.save()
          if product.express_pressing == True or product.express_dryclean == True or product.express_wash_and_pressing_price == True:
              product.express = True
          else:
              product.express = False
          product.save()
  
      return redirect('admins:vendor_items', pk=vendor_id)
  </code></pre>
  <p>this is the error showing</p>
  <pre><code>\lib\site-packages\django\utils\duration.py&quot;, line 44, in duration_microseconds
      return (24 * 60 * 60 * delta.days + delta.seconds) * 1000000 + delta.microseconds
  AttributeError: 'str' object has no attribute 'days'
  </code></pre>