title: TypeError at /check-out getting dict value but i want both dict and also specified value
body: <p>When i checkout an order i got this error.I am passing a dict in customer object but whenever i remove dict function i cant login anymore. i cant also fetch customer details.</p>
  <p>Here is my views.py(i think my problems are in these views only):</p>
  <pre><code>class Login(View):
      def get(self, request):
          return render(request, 'signupsignin/signin.html')
  
      def post(self, request):
          phone_number = request.POST.get('phone_number')
          password = request.POST.get('password')
          customer = Customer.get_customer(phone_number)
          error_message = None
          if customer:
              match = check_password(password, customer.password)
              if match:
                  customer.__dict__.pop('_state')
                  request.session['customer'] = customer.__dict__
                  #request.session['csutomer'] = customer.id
                  return redirect('Home')
              else:
                  error_message = 'Phone number or Password didnt match on our record'
          else:
              error_message = 'No Customer Found! Please Registrer First!'
          print(phone_number, password)
          context = {'error_message': error_message}
          return render(request, 'signupsignin/signin.html', context)
  class Checkout(View):
      def post(self, request):
          fname = request.POST.get('fname')
          phone = request.POST.get('phone')
          address = request.POST.get('address')
          cart = request.session.get('cart')
          customer = request.session.get('customer')
          products = Product.get_products_id(list(cart.keys()))
  
          print(fname, phone, address, products, cart, customer)
  
          for product in products:
              order = Order(customer=Customer(id=customer), product=product, fname=fname,
                            price=product.price, phone=phone, address=address, quantity=cart.get(str(product.id)))
  
              order.save()
  
          request.session['cart'] = {}
  
          return redirect('cart')
  </code></pre>
  <p>Here is my urls.py for these function:</p>
  <pre><code>path('login', Login.as_view(), name='login'),
  path('check-out', Checkout.as_view(), name=&quot;check-out&quot;),
  </code></pre>
  <p>I am getting this error:</p>
  <pre><code>TypeError at /check-out
  Field 'id' expected a number but got {'id': 3, 'phone_number': '01622153196', 'email': 'sakibovi@gmail.com', 'password': 'pbkdf2_sha256$216000$H2o5Do81kxI0$2tmMwSnSJHBVBTU9tQ8/tkN7h1ZQpRKrTAKkax1xp2Y=', 'coin': 1200.0}.
  </code></pre>