Your question seems to be incomplete considering you are using a login_required decorator then you also want to limit access to the file
If you put it in your static directory then it will be public if anyone knows the URL to the file On Sat, Apr 9, 2016 at 1:56 PM, Luca Brandi <[email protected]> wrote: > Hi, > I need to make something very simple but it seems all exmplesI found on > the web, do not work, so I am sure this group will find the right solution > (please consider I am a newbie so please be specific and detailed in your > reply): > I just need to store a pdf file in my sytic files and have a link on a > page which opens it. > Best solution I found is not working...: > view.py: > @login_required > def pricelist (request): > template='pricelist.pdf' > return render (request, template ,{}) > > url.py: > url(r'^pricelist/$', 'aero.views.pricelist', name='pricelist'), > > url link in the page: <a href="{{ MEDIA_URL > }}/pdf/pricelistAR.pdf">Download</a> > > > anyone can help? thanks very much > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/a0d7a435-1a46-4cee-9d04-0ade09363ae7%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/a0d7a435-1a46-4cee-9d04-0ade09363ae7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CALn3ei3k9GKDUMDj4zZWW1CL4HXLgtZP%2BaD%2BkrT%2BwFhY95Nttg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

