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
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
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??
Lightbourne
can i use django for flutter app as a backend??
you can use any technology for backend for your client applications
ES
you can use any technology for backend for your client applications
i mean is django and python good for backend of flutter app? or other technology can be good i ask beacuse i want to know about salary and careear options
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
How can we enable camera option in django
You'll need opencv library
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
I'm working with ajax and django but when I set cache = false in ajax it doesn't work. Pls I need help. Thanks
chafe false in ajax? What does it means? explain your issue in a more detailed way
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)
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
can i use django for flutter app as a backend??
Yes you can even I was also worked with django rest api and flutter
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')
Maxim
Why this code causing logout?
it looks more like the cause should be found on the frontend
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
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?
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
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
MK
Can anyone explain me what is the purpose of explicit trailing slash with route names? what will happen if I don't include it explicitly? path("ict", views.ict, name="blog-ict") versus path("ict/", views.ict, name="blog-ict")
When you insert a slash, whenever someone visits the link even without putting the slash, it works. But when you don't put the slash, when the person visit the link with slash at the end, it won't go to the desired url. Standard practice always encourages put slash at the end of every url
ES
AttributeError: 'Profile' object has no attribute 'profileimg' what can i do?
|-|●$€!|/|
AttributeError: 'Profile' object has no attribute 'profileimg' what can i do?
It says there is nothing as profileimg that django is aware of , you should set the name correctly
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
What you asking about is https://en.wikipedia.org/wiki/Microservices
.
AttributeError: 'Profile' object has no attribute 'profileimg' what can i do?
You can do one of the followings: 1. define an attribute in Profile class, profileimg = field definition 2. define a method or property in Profile class, def profileimg(args): function 3. don’t use it
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
Thanks farooq!
Mention not
bhzad
U'd better optimize your SQL-hits, because I see that your request is about thas kind of stuff, not about language speed. But if I am wrong, you can try and share your experience with us
Yes, it is related to SQL But I meant that the for loop in Python is slower than the for loop in Golang Is it possible to get help from Golang in some cases? Maybe I can't tell you my goal clearly Let me say that I am interested in Python and Django
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?