code: def delete_entry(request, entry_id):
      
      try:
          entry = Entry.no_join.get(pk=entry_id, user=request.user)
      except Entry.DoesNotExist:
          message = 'No such entry found.'
          messages.info(request, message)
          url = request.GET.get('next', reverse('dashboard'))
          return HttpResponseRedirect(url)
  
      if request.method == 'POST':
          key = request.POST.get('key', None)
          if key and key == entry.delete_key:
              entry.delete()
              message = 'Deleted {0} for {1}.'.format(entry.activity.name, entry.project)
              messages.info(request, message)
              url = request.GET.get('next', reverse('dashboard'))
              return HttpResponseRedirect(url)
          else:
              message = 'You are not authorized to delete this entry!'
              messages.error(request, message)
  
      return render(request, 'timepiece/entry/delete.html', {
          'entry': entry,
      })
docs: Give the user the ability to delete a log entry, with a confirmation
      beforehand.  If this method is invoked via a GET request, a form asking
      for a confirmation of intent will be presented to the user. If this method
      is invoked via a POST request, the entry will be deleted.