Alek
do anyone convert xls to pdf?
Do you mean service or how to implement it? I previously used tabula to read pdf and convert it to xls, maybe it can reverse this process
Денис
tabule give me that error : tabula-py ValueError: Unknown 'output_format': 'pdf'
Alek
Денис
i trying :)
Hero
Hero
do anyone convert xls to pdf?
To convert an XLS (Excel) file to PDF in Django, you can use a third-party library such as pyexcel-pdf or openpyxl.
Hero
do anyone convert xls to pdf?
from django.http import FileResponse
import pyexcel as pe
def convert_xls_to_pdf(request, file_name):
# Load the XLS file using pyexcel
xls_content = pe.get_sheet(file_name=file_name)
# Save the XLS content as a PDF file
xls_content.save_as(file_name + '.pdf')
# Return the PDF file as a response
with open(file_name + '.pdf', 'rb') as pdf:
response = FileResponse(pdf)
response['Content-Type'] = 'application/pdf'
response['Content-Disposition'] = 'attachment; filename="{}.pdf"'.format(file_name)
return response
Денис
karakurt
PageNumberPagination or LimitOffsetPage - which one to use in DRF?
Ravikumar
i deployed my project in aws ubuntu static files are not loading anyone can please help me
Rutya
How to create django firebase notification API and implement django notification
Rutya
Bou
i need roadmap for django
切腹
Дениска
Hello! I'm new to Celery so I want to start the task: https://dpaste.org/CvLp8 when I save the data to the database.
I have this code from models.py: https://dpaste.org/kJRVD , the main purpose of the task is to set race_active to False when time runs out. This time I set the end_time field of the model.
But when I try to run a task after the save() method while adding a new object from the Django admin panel, I get an error like this:
> EncodeError at /admin/timer/race/add/
Object of type Race is not JSON serializable
Can someone help with this issue?
ES
can i use django for flutter app as a backend??
IZUKU
How can we enable camera option in django
ES
do you have a free front them for using in django as a exectsice
Rishabh
Baba
I'm working with ajax and django but when I set cache = false in ajax it doesn't work.
Pls I need help.
Thanks
Charly
Sergey
hi guys, how to resolve this thing (when testing i get):
RuntimeError: Model class backend.engine_shop.maintenance_data.models.aircraft_md.main.Manufacturer doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
p.s I remove all relative imports (except init files)
Heigler Rocha
Kene
Hi guys. Anyone know a site dedicated to Django jobs or gigs?
One different from djangojobs.**
Fathullo
hi guys where can i learn django for free
Doragonsureiyā
hi guys where can i learn django for free
Looking for Django tutorials? you can follow these three recommended ones:
* Official documentation and tutorial
* Tutorial from MDN
* Tutorial from django-girls
VIGNA
I wanna implement google auth in my react app. for backend i wanna use django rest api. can someone please tell me is it possible. how
Farooq
Rahul Yadav
def deleteFile(request, id):
try:
file = MyFile.objects.get(id=id)
file.is_active = False
file.save()
except MyFile.DoesNotExist:
file = None
return redirect('home')
Rahul Yadav
Maxim
or elsewhere
Rahul Yadav
Ok
Rahul Yadav
Actually after login when i try to delete my file
Rahul Yadav
I got anynomous user
Farooq
https://dpaste.org/7ewfp
Farooq
Link For HTML page
--------------------------
https://dpaste.org/j1U5B
Farooq
Link of models.py
----------------------------
https://dpaste.org/pVcmX
Farooq
Maxim
so, what is the issue?
Farooq
When I search of particular place it's not taking
Farooq
Or not giving out put
.
Or not giving out put
To get help around here, you have to be more specific as to how exactly does it “not give output”.
Did the page suddenly got closed? Or blank white page? Or “loaction” variable becomes empty in the rendered template? Or Django quitted unexpectedly?
Farooq
Nityananda
I am unable to deploy drf in railway
Nityananda
It's showing me error like deployment failed during build process
Nityananda
Nixpacks build failed showing error like this
Nityananda
Nixpacks was unable to generate a build plan for this app
Kene
daft
Good day, i have an issue that I already posted on https://stackoverflow.com/questions/75345573/valueerror-at-approve-2-field-id-expected-a-number-but-got
daft
ES
AttributeError: 'Profile' object has no attribute 'profileimg'
what can i do?
bhzad
Hello I have been learning Django for a short time My question is, is it possible to increase the speed of Django by using Golang programming language? For example, you built a social networking site and you want to filter between 2,000, 3,000 rooms and show them all with For, so can it be entered with Golang and combined with Django to increase the display and loading speed? I mean such things
Thank you if you answer
Oleg
Oleg
What you asking about is https://en.wikipedia.org/wiki/Microservices
Varun
Can anyone please recommend me some good resources for django rest framework
Varun
I wanna learn all the basics n stuff…im a beginner rn
.
Varun
I was asking for some tutorials😅
Varun
Reading docs is such a drag
Varun
Tho its a good practice
Farooq
Varun
Farooq
Riad
Mohamad
How to display lists of two different models in ListView in one HTML template ?
&&&mahdiyousfi&&&
How form
Maxim
Adorilson
Can anyone please recommend me some good resources for django rest framework
Here are some recommended resources for learning and using Django Rest Framework:
Official Documentation: https://www.django-rest-framework.org/
Django Rest Framework Tutorial: https://www.django-rest-framework.org/#tutorial
DRF Cookbook: https://books.agiliq.com/projects/django-rest-framework-cookbook/en/latest/
DRF Source Code on GitHub: https://github.com/encode/django-rest-framework
Full Stack Python: https://www.fullstackpython.com/django-rest-framework.html
DRF YouTube Tutorials by Corey Schafer: https://www.youtube.com/playlist?list=PL-osiE80TeTs4UjLw5MM6OjgkjFeUxCYH
DRF Course by Udemy: https://www.udemy.com/topic/django-rest-framework/
Blog Posts on the DRF official website: https://www.django-rest-framework.org/blog/
These resources should provide you with a good starting point for learning and using Django Rest Framework effectively.
&&&mahdiyousfi&&&
Django form code example takes information from the Postgres database and displays it in the form
rtg
Hi! How can i use addresses in django framework? If i need all map addresses of Europe or of the world? Example: new event with description and address: "Django course in Buenavista street 1, Madrid".
rtg
thank you!
Artur
Hi guys!
how i can substitute field data of the serializer during validation. For example I am sending email and when I validating this field I substitute email on really user if user instance exists?