Monday, May 23, 2016

Re: Displaying a document

The users will need a browser which is capable of rendering the file or knowing what app it has to use - for example, on my machine (Linux) an XLS file is rendered directly by LibreOffice; but on a colleague's machine with Windows/IE they have to first download the file and then open it. So, you will need to provide instructions for users to configure their browsers.

On Sunday, 22 May 2016 18:36:15 UTC+2, Wilfredo Rivera wrote:
I fixed it. but now the website give me the option of downloading the file. How can i do for the website to display the file?

On Sunday, May 22, 2016 at 8:27:10 AM UTC-7, Wilfredo Rivera wrote:
It give me this kind of error:


Using the URLconf defined in hr_solution.urls, Django tried these URL patterns, in this order:

  1. ^admin/
  2. ^user/
  3. ^$ [name='candidate_entry']
  4. ^candidatelist/$ [name='candidate_list']
  5. ^candidatelist/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[-\w]*)/$ [name='candidate_detail']
  6. ^candidatelist/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>[-\w]*)/update/$ [name='candidate_update']

The current URL, candidatelist/resume/Resume_Wilfredo_Rivera.pdf, didn't match any of these.


How can I desing a url that match the one with the uploaded file and what view handles it?



On Saturday, May 21, 2016 at 7:56:42 PM UTC-7, luisza14 wrote:

2016-05-21 13:21 GMT-06:00 Wilfredo Rivera <wriv...@gmail.com>:
<td><a href="{{ MEDIA_URL }}">{{candidate.resumeFile}}"</a></td>


<td><a href="{{candidate.resumeFile.url}}">{{candidate.resumeFile.name}}"</a></td>

Looking in your code probably you could be interested in https://docs.djangoproject.com/ja/1.9/ref/class-based-views/generic-editing/



--
"La utopía sirve para caminar" Fernando Birri


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2b925e3c-59b9-42ec-840f-79ebe27b8ae7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment