Re: Django pdfs

2020-04-23 Thread Perceval Maturure
thanks Lunga
I will share once im done

On Thu, Apr 23, 2020 at 2:35 PM Lunga Baliwe  wrote:

> I don't know about the download button but the PDF file should be just a
> normal file like an image file
> Check this Django admin
> 
>  cookbook
> for working with django admin, there's an example of downloading a csv
> hopefully it should work the same for the pdf aswell.
> and also check
> https://stackoverflow.com/questions/42077645/how-to-make-an-admin-action-in-django-to-download-users-pdf-files
>
> On Thu, Apr 23, 2020 at 2:11 PM Perceval Maturure 
> wrote:
>
>>
>> Hi Lunga
>> thats the part of the model and the file in django admin in production.
>> when debug is off i cant access to url to download the file, would be nice
>> to have an download button in admin, just clicking on it and download the
>> file. is the possible?
>> Regards
>> Perceval
>>
>> On Thu, Apr 23, 2020 at 1:13 PM Lunga Baliwe  wrote:
>>
>>> Also check
>>> https://docs.djangoproject.com/en/3.0/ref/models/instances/#get-absolute-url
>>>
>>> Kind regards,
>>> Lunga Baliwe
>>>
>>> On Thu, Apr 23, 2020 at 1:04 PM Lunga Baliwe  wrote:
>>>
 Hi Perceval,

 On production I think you have to allow access to your MEDIA path, I
 normally do this on the apache config per site.

 Do you mind sharing your code or maybe  screen shots of what appears on
 the admin screen.

 Also it maybe be worth to return a name or url path like __str__
 
  your
 model.

 You may also wanna check
 https://django-easy-pdf.readthedocs.io/en/v0.2.0-dev1/  and
 https://stackoverflow.com/questions/11779246/how-to-show-a-pdf-file-in-a-django-view/46267916

 On Thu, Apr 23, 2020 at 12:26 PM Perceval Maturure <
 drperce...@gmail.com> wrote:

> Hi Lunga
> When debug mode is False in production the url link of the file is not
> accessible in admin which is ok for security reasons but in admin I can
> download the file for preview
> Regards
> Perceval
>
> On Wed, 22 Apr 2020 at 18:39, Lunga Baliwe  wrote:
>
>> Maybe you can check Django FileField
>>   for
>> upload and check what it looks like on the admin side.
>>
>>
>> On Wed, Apr 22, 2020 at 6:09 PM Hella Nick 
>> wrote:
>>
>>> me to。do you help me?
>>>
>>> Perceval Maturure 于2020年4月22日 周三07:31写道:
>>>
 Hi Django Users

 I am developing a Django document management system which will
 cater for pdf file uploads. What is the best resource to use 
 (tutorial) as
 I want to have the pdfs accessible from admin. Can I do this with 
 Django
 filer

 Regards

 Perceval

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
 .

>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com
>> 
>> .
>>
> --
> Sent from Gmail Mobile
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this 

Re: Django pdfs

2020-04-23 Thread Lunga Baliwe
I don't know about the download button but the PDF file should be just a
normal file like an image file
Check this Django admin

cookbook
for working with django admin, there's an example of downloading a csv
hopefully it should work the same for the pdf aswell.
and also check
https://stackoverflow.com/questions/42077645/how-to-make-an-admin-action-in-django-to-download-users-pdf-files

On Thu, Apr 23, 2020 at 2:11 PM Perceval Maturure 
wrote:

>
> Hi Lunga
> thats the part of the model and the file in django admin in production.
> when debug is off i cant access to url to download the file, would be nice
> to have an download button in admin, just clicking on it and download the
> file. is the possible?
> Regards
> Perceval
>
> On Thu, Apr 23, 2020 at 1:13 PM Lunga Baliwe  wrote:
>
>> Also check
>> https://docs.djangoproject.com/en/3.0/ref/models/instances/#get-absolute-url
>>
>> Kind regards,
>> Lunga Baliwe
>>
>> On Thu, Apr 23, 2020 at 1:04 PM Lunga Baliwe  wrote:
>>
>>> Hi Perceval,
>>>
>>> On production I think you have to allow access to your MEDIA path, I
>>> normally do this on the apache config per site.
>>>
>>> Do you mind sharing your code or maybe  screen shots of what appears on
>>> the admin screen.
>>>
>>> Also it maybe be worth to return a name or url path like __str__
>>> 
>>>  your
>>> model.
>>>
>>> You may also wanna check
>>> https://django-easy-pdf.readthedocs.io/en/v0.2.0-dev1/  and
>>> https://stackoverflow.com/questions/11779246/how-to-show-a-pdf-file-in-a-django-view/46267916
>>>
>>> On Thu, Apr 23, 2020 at 12:26 PM Perceval Maturure 
>>> wrote:
>>>
 Hi Lunga
 When debug mode is False in production the url link of the file is not
 accessible in admin which is ok for security reasons but in admin I can
 download the file for preview
 Regards
 Perceval

 On Wed, 22 Apr 2020 at 18:39, Lunga Baliwe  wrote:

> Maybe you can check Django FileField
>   for
> upload and check what it looks like on the admin side.
>
>
> On Wed, Apr 22, 2020 at 6:09 PM Hella Nick 
> wrote:
>
>> me to。do you help me?
>>
>> Perceval Maturure 于2020年4月22日 周三07:31写道:
>>
>>> Hi Django Users
>>>
>>> I am developing a Django document management system which will cater
>>> for pdf file uploads. What is the best resource to use (tutorial) as I 
>>> want
>>> to have the pdfs accessible from admin. Can I do this with Django filer
>>>
>>> Regards
>>>
>>> Perceval
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
>> 
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com
> 
> .
>
 --
 Sent from Gmail Mobile

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAFZtZmAXX6s8E3h40CviBWqyfbyMqCZf%2ByJ2t9au4nNBUege6g%40mail.gmail.com
 

Re: Django pdfs

2020-04-23 Thread Lunga Baliwe
Also check
https://docs.djangoproject.com/en/3.0/ref/models/instances/#get-absolute-url

Kind regards,
Lunga Baliwe

On Thu, Apr 23, 2020 at 1:04 PM Lunga Baliwe  wrote:

> Hi Perceval,
>
> On production I think you have to allow access to your MEDIA path, I
> normally do this on the apache config per site.
>
> Do you mind sharing your code or maybe  screen shots of what appears on
> the admin screen.
>
> Also it maybe be worth to return a name or url path like __str__
> 
>  your
> model.
>
> You may also wanna check
> https://django-easy-pdf.readthedocs.io/en/v0.2.0-dev1/  and
> https://stackoverflow.com/questions/11779246/how-to-show-a-pdf-file-in-a-django-view/46267916
>
> On Thu, Apr 23, 2020 at 12:26 PM Perceval Maturure 
> wrote:
>
>> Hi Lunga
>> When debug mode is False in production the url link of the file is not
>> accessible in admin which is ok for security reasons but in admin I can
>> download the file for preview
>> Regards
>> Perceval
>>
>> On Wed, 22 Apr 2020 at 18:39, Lunga Baliwe  wrote:
>>
>>> Maybe you can check Django FileField
>>>   for
>>> upload and check what it looks like on the admin side.
>>>
>>>
>>> On Wed, Apr 22, 2020 at 6:09 PM Hella Nick  wrote:
>>>
 me to。do you help me?

 Perceval Maturure 于2020年4月22日 周三07:31写道:

> Hi Django Users
>
> I am developing a Django document management system which will cater
> for pdf file uploads. What is the best resource to use (tutorial) as I 
> want
> to have the pdfs accessible from admin. Can I do this with Django filer
>
> Regards
>
> Perceval
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
> .
>
 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
 
 .

>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> Sent from Gmail Mobile
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAFZtZmAXX6s8E3h40CviBWqyfbyMqCZf%2ByJ2t9au4nNBUege6g%40mail.gmail.com
>> 
>> .
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANDnEWd1Np8NVggTn%2BZFWotKp0QdKo%2BF8W4TLUJJcmAYOyPJLQ%40mail.gmail.com.


Re: Django pdfs

2020-04-23 Thread Lunga Baliwe
Hi Perceval,

On production I think you have to allow access to your MEDIA path, I
normally do this on the apache config per site.

Do you mind sharing your code or maybe  screen shots of what appears on the
admin screen.

Also it maybe be worth to return a name or url path like __str__

your
model.

You may also wanna check
https://django-easy-pdf.readthedocs.io/en/v0.2.0-dev1/  and
https://stackoverflow.com/questions/11779246/how-to-show-a-pdf-file-in-a-django-view/46267916

On Thu, Apr 23, 2020 at 12:26 PM Perceval Maturure 
wrote:

> Hi Lunga
> When debug mode is False in production the url link of the file is not
> accessible in admin which is ok for security reasons but in admin I can
> download the file for preview
> Regards
> Perceval
>
> On Wed, 22 Apr 2020 at 18:39, Lunga Baliwe  wrote:
>
>> Maybe you can check Django FileField
>>   for
>> upload and check what it looks like on the admin side.
>>
>>
>> On Wed, Apr 22, 2020 at 6:09 PM Hella Nick  wrote:
>>
>>> me to。do you help me?
>>>
>>> Perceval Maturure 于2020年4月22日 周三07:31写道:
>>>
 Hi Django Users

 I am developing a Django document management system which will cater
 for pdf file uploads. What is the best resource to use (tutorial) as I want
 to have the pdfs accessible from admin. Can I do this with Django filer

 Regards

 Perceval

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
 .

>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com
>> 
>> .
>>
> --
> Sent from Gmail Mobile
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFZtZmAXX6s8E3h40CviBWqyfbyMqCZf%2ByJ2t9au4nNBUege6g%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANDnEWcsKHPj%2BazXSnpEAb6BubFZPzxhtskjpTaz1c%2B93rO-%3Dw%40mail.gmail.com.


Re: Django pdfs

2020-04-23 Thread Perceval Maturure
Hi Lunga
When debug mode is False in production the url link of the file is not
accessible in admin which is ok for security reasons but in admin I can
download the file for preview
Regards
Perceval

On Wed, 22 Apr 2020 at 18:39, Lunga Baliwe  wrote:

> Maybe you can check Django FileField
>   for
> upload and check what it looks like on the admin side.
>
>
> On Wed, Apr 22, 2020 at 6:09 PM Hella Nick  wrote:
>
>> me to。do you help me?
>>
>> Perceval Maturure 于2020年4月22日 周三07:31写道:
>>
>>> Hi Django Users
>>>
>>> I am developing a Django document management system which will cater for
>>> pdf file uploads. What is the best resource to use (tutorial) as I want to
>>> have the pdfs accessible from admin. Can I do this with Django filer
>>>
>>> Regards
>>>
>>> Perceval
>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
>> 
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com
> 
> .
>
-- 
Sent from Gmail Mobile

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFZtZmAXX6s8E3h40CviBWqyfbyMqCZf%2ByJ2t9au4nNBUege6g%40mail.gmail.com.


Re: Django pdfs

2020-04-22 Thread Lunga Baliwe
Maybe you can check Django FileField
  for
upload and check what it looks like on the admin side.


On Wed, Apr 22, 2020 at 6:09 PM Hella Nick  wrote:

> me to。do you help me?
>
> Perceval Maturure 于2020年4月22日 周三07:31写道:
>
>> Hi Django Users
>>
>> I am developing a Django document management system which will cater for
>> pdf file uploads. What is the best resource to use (tutorial) as I want to
>> have the pdfs accessible from admin. Can I do this with Django filer
>>
>> Regards
>>
>> Perceval
>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANDnEWdBhLMgNud%2B6CZguak0%3DSEivu2VHOGEOY1RV2kVjS7oFw%40mail.gmail.com.


Re: Django pdfs

2020-04-22 Thread Hella Nick
me to。do you help me?

Perceval Maturure 于2020年4月22日 周三07:31写道:

> Hi Django Users
>
> I am developing a Django document management system which will cater for
> pdf file uploads. What is the best resource to use (tutorial) as I want to
> have the pdfs accessible from admin. Can I do this with Django filer
>
> Regards
>
> Perceval
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B912F6EC-E628-49E8-91AB-8442B25A7E34%40gmail.com
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHfGPEfRLO_VqswP9sHG%2BOM_HOob%2BQw2ztgvZx3TbMd5%3Dtk50w%40mail.gmail.com.