I relly want to know how to send emails from django admin panel...
Like i want to send emails to employees using django admin..
And how to export django models data from django admin as PDF format
Like I need to export all the employee details as PDF file.. ( I know how to export as CSV file but not PDF)
Can you do a quick tutorials about these 2 sir?
Do you want to dowload the data as PDF in backend or you want to show the PDF downlopad option in UI where user can download the data as PDF?
- bhavana 4 years, 9 months agoDid you tried reporrtab library. I think it should satisfy your requirement. May be I will try to create the script and share. Meanwhile if you search for reportlab you will get some idea as well
- bhavana 4 years, 9 months agoI tried to do.. but it's not working for backend.. I'll try again too ..
- deepikasrinivasasharma 4 years, 9 months agodid you tried with this approach https://docs.djangoproject.com/en/3.0/howto/outputting-pdf/?
- VengatI saw that file, but I don't understand that. I tried to do but I couldn't understand so i couldn't do
- deepikasrinivasasharma 4 years, 9 months agook share you code what you did so far?, then i can extend the code accordingly based on your requirement
- VengatAs i see , you have raised the ticket as URGENT* priorty but no response from your end. So we will change the priority to LOW
- VengatSorry sir, I don't have my laptop with me now. the code is in there
- deepikasrinivasasharma 4 years, 9 months ago
Acknowledged. i see 2 questions you were looking for it. How to send the email from Django admin. Its straight forward. you can use EMAIL setup in your settings.py then you can use this library to handle it , msg = EmailMultiAlternatives(subject, text_content, settings.DEFAULT_FROM_EMAIL, [admin_email])