Project

General

Profile

« Previous | Next » 

Revision 02f39251

Added by Frédéric Péters over 12 years ago

dossiers: use custom redirect class to avoid django choking on file:// (#2135)

View differences:

calebasse/dossiers/views.py
634 634
            response.write(file(to_path).read())
635 635
            return response
636 636
        else:
637
            class LocalFileHttpResponseRedirect(HttpResponseRedirect):
638
                allowed_schemes = ['file']
637 639
            client_filepath = os.path.join(client_dir, dest_filename)
638
            return HttpResponseRedirect('file://' + client_filepath)
640
            return LocalFileHttpResponseRedirect('file://' + client_filepath)
639 641

  
640 642
generate_rtf_form = GenerateRtfFormView.as_view()
641 643

  

Also available in: Unified diff