docs: def occurrence_view(
      request,
      event_pk,
      pk,
      template='swingtime/occurrence_detail.html',
      form_class=forms.SingleOccurrenceForm
  ):
      '''
      View a specific occurrence and optionally handle any updates.
  
      Context parameters:
  
      ``occurrence``
          the occurrence object keyed by ``pk``
  
      ``form``
          a form object for updating the occurrence
      '''
      occurrence = get_object_or_404(Occurrence, pk=pk, event__pk=event_pk)
      if request.method == 'POST':
          form = form_class(request.POST, instance=occurrence)
          if form.is_valid():
              form.save()
              return http.HttpResponseRedirect(request.path)
      else:
          form = form_class(instance=occurrence)
  
      return render(request, template, {'occurrence': occurrence, 'form': form})