I have a django nodel. and in django admin when i fill it and click save button, it be saved in django admin and also it should be converted and saved as a pdf file. how to do this? Thanks in advance..
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Create a method that listens on the post_save signal for your model; then you can follow the tutorial here on how to output PDFs from django.
If your PDF layout is simple, you can use the xhtml2pdf library to convert a HTML template to a PDF file.