1

I have an application that loads different documents to the server, and allows users to read documents' content. I am uploading the documents to the server, and then I try to read the courses by id, like:

 def view_course(request,id):
  u = Courses.objects.get(pk=id)

etc

But I don't find anywhere: how can I actually read the content of a /.doc/.pdf/.txt and display it on a web page?

Cœur
  • 34,719
  • 24
  • 185
  • 251
dana
  • 4,768
  • 20
  • 71
  • 116

1 Answers1

1

Reading plain text files is trivial, while PDF and Word processing is not. For the latter two you'll have to incorporate some external libraries.

Community
  • 1
  • 1
miku
  • 172,072
  • 46
  • 300
  • 307