<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lostitem_delete_view(request, item_id):
 """Delete a lostitem. id: lostitem id """

    if request.method == "POST":
        try:
            a = LostItem.objects.get(id=item_id)
            if request.POST.get("full_delete", False):
                a.delete()
                messages.success(request, "Successfully deleted lost item.")
            else:
                a.found = True
                a.save()
                messages.success(request, "Successfully marked lost item as found!")
        except LostItem.DoesNotExist:
            pass

        return redirect("index")
    else:
        lostitem = get_object_or_404(LostItem, id=item_id)
        return render(request, "lostfound/lostitem_delete.html", {"lostitem": lostitem})