AttributeError on successful redirection in django?
问题 Redirection on successful POST request from Host View. def product_page_view(request, prod_slug, color=None, size=None): ... ... prod = Product.objects.filter(slug=prod_slug).first() seller = prod.seller ... .... order_form = Buy_now_form() if request.method == "POST": order_form = Buy_now_form(request.POST) if order_form.is_valid(): # Function for processing POST request and return order order = buy_now_view(request, prod.slug, color, size) # Redirection return redirect(reverse('product