Skip to content

Instantly share code, notes, and snippets.

Created January 4, 2014 23:40
What would you like to do?
def get_order(request, order_id):
order = Order.get(id=order_id)
data = {}
if request.method == 'GET':
data['order'] = order
elif request.method == 'POST':
order.amount = request.POST.get('amount')
elif request.method == 'DELETE':
data['order'] = order
return render_to_response('order.html', data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment