You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
405 B
Python
12 lines
405 B
Python
from django.shortcuts import render, get_object_or_404, redirect
|
|
from osinacore.models import *
|
|
from billing.models import *
|
|
from osinacore.decorators import *
|
|
|
|
@staff_login_required
|
|
def delete_orderitem(request, orderitem_id):
|
|
order_item = get_object_or_404(OrderItem, id=orderitem_id)
|
|
order_id = order_item.order.id
|
|
order_item.delete()
|
|
return redirect('orderdetails', order_id=order_id)
|