Re: TypeError: 'module' object is not iterable - django 4

2022-02-01 Thread muwaga micheal
Issue was sorted.. Here is the link. python 3.x - TypeError: 'module' object is not iterable in django 4 - Stack Overflow On Monday, January 31, 2022 at 11:53:03 AM UTC+3 muwaga micheal wrote: > H

Downloading html as pdf using popen, headless chrome option

2022-02-01 Thread Aadil Rashid
I am trying to generating pdf from webpages, using popen , but when i call this view it generates UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 10: invalid continuation byte This is my view from projName.settings import BASE_DIR from subprocess import Popen, PIPE, STDOUT

Re: Downloading html as pdf using popen, headless chrome option

2022-02-01 Thread Jisson Varghese
Check whether FileResponse instead of StreamingHttpResponse helps to solve the issue , https://docs.djangoproject.com/en/4.0/ref/request-response/#fileresponse-objects On Tue, Feb 1, 2022 at 11:26 PM Aadil Rashid wrote: > I am trying to generating pdf from webpages, using popen , but when i call

Re: Downloading html as pdf using popen, headless chrome option

2022-02-01 Thread Aadil Rashid
*@Jisson Varghese Thank you very much it worked completely fine now* On Tuesday, February 1, 2022 at 11:39:22 PM UTC+5:30 jis...@gmail.com wrote: > Check whether FileResponse instead of StreamingHttpResponse helps to solve > the issue , > https://docs.djangoproject.com/en/4.0/ref/request-respon

Resource leaks from FieldFile's implicit open?

2022-02-01 Thread Carsten Fuchs
Dear group, despite a lot of reading and searching I still don't understand how FieldFiles work. The documentation at https://docs.djangoproject.com/en/4.0/ref/models/fields/#django.db.models.fields.files.FieldFile says: > The API of FieldFile mirrors that of File, with one key difference: Th

Barcode

2022-02-01 Thread Andres Quilindo
Does anyone have experience with UCC/EAN-128 barcodes? I am using a javascript barcode js library with django to implement the barcode but it is generating errors when reading if anyone knows any library or api that can be used that complies with the UCC/EAN-128 parameters that can provide me w

Re: Barcode

2022-02-01 Thread Alen Zuvic
punakap...@gnail.com On Wed, 2 Feb 2022, 01:08 Alen Zuvic, wrote: > > On Wed, 2 Feb 2022, 01:05 Andres Quilindo, < > andres.quili...@uaiinpebi-cric.edu.co> wrote: > >> Does anyone have experience with UCC/EAN-128 barcodes? I am using a >> javascript barcode js library with django to implement th

Re: how to Display images other than from static folder.

2022-02-01 Thread ramsha azhar
still, I'm confused, Guide me what to write in views.py to display images on my HTML page. the main problem is how to set this path in views.py file to get image from this path. I jst want to display this tree.pdf file on my html page. Any one tell me what to write in views.py? BASE_DIR = os.path.d

web page blank

2022-02-01 Thread 'Delvin Alexander' via Django users
Hello everyone, I am currently following a django tutorial regarding applications. I have followed through completely but for some reason, when I run server, i incur no errors but the web page is blank. Why would this be? Here is what is not displayed: from my Home.html file: {%

Re: how to Display images other than from static folder.

2022-02-01 Thread RANGA BHARATH JINKA
Hi, Pass the pdf URL as a context variable in the views function. Then you can easily access it in your HTML using jinja templating and HTML anchor tag All the best On Wed, Feb 2, 2022 at 11:03 AM ramsha azhar wrote: > still, I'm confused, Guide me what to write in views.py to display images

Re: how to Display images other than from static folder.

2022-02-01 Thread RANGA BHARATH JINKA
Hi, Please follow this. https://djangocentral.com/managing-media-files-in-django/ You have to store your images in a static media folder by adding the media path in settings.py. This is the recommended way and easy to access the images All the best On Wed, Feb 2, 2022 at 11:30 AM RANGA BHARATH J

Re: web page blank

2022-02-01 Thread Sebastian Jung
Hello, Please try: context = { 'posts': post } 'Delvin Alexander' via Django users schrieb am Mi., 2. Feb. 2022, 06:59: > Hello everyone, > > I am currently following a django tutorial regarding applications. I have > followed through completely but for some reason, when I run serv