(request, md5)
Unzip a sample.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param md5: The MD5 of the sample to use.
    :type md5: str
    :returns: :class:`django.http.HttpResponse`
Unzip a sample.
Unzip a sample .
def unzip_sample(request, md5):
    """
    Unzip a sample.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param md5: The MD5 of the sample to use.
    :type md5: str
    :returns: :class:`django.http.HttpResponse`
    """

    if request.method == "POST":
        form = UnzipSampleForm(request.POST)
        if form.is_valid():
            pwd = form.cleaned_data['password']
            try:
                handle_unzip_file(md5, user=request.user, password=pwd)
            except ZipFileError, zfe:
                return render(request, 'error.html', {'error' : zfe.value})
        return HttpResponseRedirect(reverse('crits-samples-views-detail',
                                            args=[md5]))
    else:
        return render(request, 'error.html', {'error': 'Expecting POST.'})
def unzip_sample ( request , md5 ) : if request . method == "POST" : form = UnzipSampleForm ( request . POST ) if form . is_valid ( ) : pwd = form . cleaned_data [ 'password' ] try : handle_unzip_file ( md5 , user = request . user , password = pwd ) except ZipFileError , zfe : return render ( request , 'error.html' , { 'error' : zfe . value } ) return HttpResponseRedirect ( reverse ( 'crits-samples-views-detail' , args = [ md5 ] ) ) else : return render ( request , 'error.html' , { 'error' : 'Expecting POST.' } )