Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def searchOrderView(request):
- if request.method == 'POST':
- try:
- order_number = request.POST.get('order_number')
- return redirect('payment', order_number=order_number)
- except Orders.DoesNotExist:
- error_message = "The order does not exist."
- return render(request, 'customers/failed.html', {'error_message': error_message})
- except Exception as e:
- return render(request, 'customers/failed.html', {'error_message': str(e)})
- else:
- return render(request, 'customers/searchOrder.html')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement