These are chat archives for django/django

Jun 2016
sumit sinha
Jun 09 2016 09:48
hello guys
i need some help
i want to use wkhtmltopdf
there i want to print multiple order number with as selection of checkbx
so anyone have any expertise on wkhtmltopdf
sumit sinha
Jun 09 2016 10:05
hey anyone used wkhtmltopdf in your won project ...means django project
Andrew Backer
Jun 09 2016 10:26
We've only used reportlab but we had to fork it for our needs. not big changes
Filip Figiel
Jun 09 2016 11:05
@sumitsinha91 if you're not very committed to that library, I recommend trying out weasyprint. it just works and probably has bigger community
also, I didn't understand your problem
elaborate plz
this my url when i am hiting on this i got pdf
i have order number so when i an using with url and order number lik this for example-
so i got one details in pdf
i want to use like multiple oder number with differnet order number like for example-, 124578965478,365478954258,
like this ...
i am sending you view code
Filip Figiel
Jun 09 2016 11:19
@sumitsinha91 lol
i won't be able to open that link buddy
sumit sinha
Jun 09 2016 11:19
class WaybillPDFView(View):
    template = 'ops/pdf.html'
    context = {'title': 'Hello World!'}

    # import pdb
    # pdb.set_trace()

    def send_order(self, wabn):
            url = "" + wabn
            token = "0db44a529d7bc40920a656efde7665d4655f9296"
            response = requests.get(url=url, headers={"Authorization": "Token " + token})
            return response.json()
        except Exception as e:
            print e

    def get(self, request):
        data = self.send_order("689080957885")
        self.context = data
        response = PDFTemplateResponse(request=request,

        return response
i know that you will not able but you can userstand
Jun 09 2016 11:26
Jun 09 2016 11:28
Hi all! Here is my another attemt to finish official Django tutorial. There is a part where we connect the poll app to our project.
As for privious Django 1.8 tutorial we added only polls to INSTALLED_APPS in Now we write something like polls.apps.PollsConfig. WTF? Why? The question is why we write this exactly? What is PollsConfig? How do I know what to write here if I connect my own app? Thanks.
Filip Figiel
Jun 09 2016 11:36
@legobillyjoe you don't really need that
from what I know, it's mostly for customizing the polls section in django admin
Jun 09 2016 11:45
@megapctr Thaanx (=
sumit sinha
Jun 09 2016 11:48
hey filip
give me some idea bro
i have show you everything related to this
Zeeshan Asgar
Jun 09 2016 11:49

hey guys....

How to generate zip archive from the PDFTemplateResponse object. I m using Django- wkhtml2pdf to generate pdf from html. Using this i got a response object, now i have to generate zip archive from it.
I have used zipfile module but it takes a file name to zip it.

So How to do it..

Thanks in advance.

Joseph Muli
Jun 09 2016 15:39
hey guys, how do I pre-fill my forms from the database?