Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

262
Views
Special characters in filenames and paths

I have django app that allows users to enter a query and in response returns a list of documents sorted by their relevance. On clicking the download button the users can download the files. For most cases the option works fine but breaks when the file name or the folder path has special characters (such as - &). The download button contains the location of where the file is located. If the path or filename contains a special character, only the string upto the special character is passed to the function in the views.py file and hence returns a FileNotFoundError at ....

So how do I ensure that django reads the complete path in cases where there are special characters involved

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Use urlencode

{{link_to_file|urlencode}}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!