code: def edit_dataset_metadata(request, dataset_id=None):
      
      if request.method == 'POST':
          return add_dataset(request, dataset_id)
  
      elif request.method == 'GET':
          # create a blank form
          # Edit
          if dataset_id:
              metadata_form = DatasetUploadForm(
                  instance=get_object_or_404(Dataset, pk=dataset_id)
              )
          # Upload
          else:
              metadata_form = DatasetUploadForm()
  
          return render(
              request,
              'datafreezer/upload.html',
              {
                  'fileUploadForm': metadata_form,
              }
          )
docs: Renders a template to upload or edit a Dataset.
  
      Most of the heavy lifting is done by add_dataset(...).