🤘
Hi guys I want to have an api for uploading photos in my app but I do not know how to do this. Can you help me?
You have two ways 1.receive photo as "form data" from front end and you can access it from request.FILES 2.receive photo as "base64" and save it (search on google how to save it) Actually i choose the first way for my projects 😁🤟
Amin
Hi I want to create a superuser which o created and 2 sub admin 1 sub admin can view only 1 specific product and second sub admin can see only specific product 1st sub admin not see second sub admin product and second sub admin can not see 1st sub admi product any suggestion Thanks in advance
unknown
make sure you are using POST method instead of GET method
Thanks for advice,But I am using Post method
unknown
Just redirect after save. Fixes resave on reloads
I have redirection after the form.save() ,but it is not working because i'm not passing validation
Richard
I have redirection after the form.save() ,but it is not working because i'm not passing validation
Not familiar with django, only answered based on your question, which didn't say anything about validation
K(RANA)
How to send reminder email before 2 days of expire date in django...please help
unknown
@imortezaw Can i send code to you direct?
Morteza
@imortezaw Can i send code to you direct?
paste your code in del.dog then give me the link
unknown
@imortezaw https://dpaste.org/RTwP
Santiago
hello, any book or course that you recommend me to implement django and node?
a
hi i have read django for beginer django for api can anybody give idea so that i try my skills?
Carlos Z. Bent
hi i have read django for beginer django for api can anybody give idea so that i try my skills?
Just start building something, anything. It can be as simple as a blog webpage.
VISHNU
Hi, by uploading photo server got time out so what's the best way to deals this in django
Anonymous
How is upload multiple image in nested serialization in rest frame work plz help
K(RANA)
get() returned more than one -- it returned 2! How to solve this kind of error
Adhil latheef
get() returned more than one -- it returned 2! How to solve this kind of error
User filter instead of get.....then use first() to get the first result....
Neha
how to map different labels having same title name with title classifier in ocr
amirHosseinZibaei
How to export a view as pdf file in django Actually i want to download it.
Bwaks
is there a better way of of getting random objects from database apart form order_by('?')[5]
ezra
hello, how to set up postgresql from sqlite3 kindly
Mirco
Lugano
Hi everyone, I have this form that you enter latitudes and longitudes and i want it to display a map with specified location in a template. How can do this?
Rutherford
hello, how to set up postgresql from sqlite3 kindly
ENGINE, NAME, USER, PASSWORD, DATABASE HOST, DATABASE PORT Set these in your settings. In the DATABASE dictionary
unknown
Hi i created Django_form to take input from user and store in database.When try to enter data to this form and after clicking submit button,the data which i entered appears on localhost url like this example(127.0.0.1:8000/username 123),and also this data is not save in db. Here is my code https://dpaste.org/Ez5d.Thanks in advance
unknown
Read this. https://t.me/django/186187
I will resend my code.Can you show me where exactly i have to change?
unknown
Okay.
https://dpaste.org/Ez5d
Rutherford
https://dpaste.org/Ez5d
https://dpaste.org/7DuZ# Change your index.html Observe it well. You'll spot the change.
unknown
https://dpaste.org/7DuZ# Change your index.html Observe it well. You'll spot the change.
I've deleted the action in form but still doesn't work
Musa
I've deleted the action in form but still doesn't work
Remove all the input fields in your form and use the form from your view Like this {{ form }}
Musa
Still doesn't work
Let me see how you implemented that and also show your view
Musa
https://dpaste.org/oatJ
Looks like you have two forms in index.html.... Remove the one with a class of "form"
Arezoo
Hi .why jwt authentication is best?can you explain about deference?
unknown
Looks like you have two forms in index.html.... Remove the one with a class of "form"
@musayerlwa No there's one form but it used several times by js
Musa
https://dpaste.org/oatJ
There are two forms here check it out
unknown
There are two forms here check it out
@musayerlwa thanks for help , you we're right
unknown
Did it work?
Yes thanks a lot
Musa
Poppu
Anyone has Azure TTS experience in django. I need to upload my Azure TTS generated file on cloud but doesn't know how should I do that.
William
How to export a view as pdf file in django Actually i want to download it.
Use the openpyxl module for creating excel sheets and uploading data in that excel file. You need to return as HttpResponse with content-type as application/ms-excel. Finally set Content-Disposition to attachment and file_name
William
Hi .why jwt authentication is best?can you explain about deference?
The authentication method depends on the project that you are building and also depends on the clients. I can say that JWT authentication is better secured than Token authentication. Because JWT has refresh and access tokens with the token expiry time.
William
Yeah but I need pdf
Do you need a PDF as output?
Rahul
OSError: [Errno 30] Read-only file system: '/static' how to fix this?? i'm trying to run this heroku run python manage.py collectstatic
Rahul
i want to load css on heroku but i'm getting this error
Rahul
app[web.1]: Not Found: /static/vendor/tempusdominus/js/tempusdominus-bootstrap-4.min.js
Nayan
Hi I don’t know the exact technical word what should I call but I want to have this below functionality In a view : Query 1 - created Query 2 - created Query 3 - created Query 4 - failed ( any kind of reason ) Or any error occurs How can I revert what has been created ??? Because it will create only half of the records Is there any way how we can achieve this ?
Nayan
And handle that error by reverting the database record if anything created
Vasilii
Hello, how can I access django admin locally if django-cms is enabled in project and I don't have an account in it?
Vaibhav
What are some of the good wysiwyg editors for django 1.9, we were using redactor but their is some bug in it which causes a lot of issues while working with it
Lugano
Hi,everyone i made a customuser using abstractUser and added a field,But the field doesn't show up in the admin. i have pasted my models.py, form.py and admin.py in https://dpaste.org/JyKw can someone tell where am i wrong
Mohd Zaid
unit = models.ForeignKey("UnitType" , on_delete = models.CASCADE)
Mohd Zaid
unit = models.ForeignKey("UnitType" , on_delete = models.CASCADE)
can anyone tell me what is the meaning of the string "UnitType" here
Mohd Zaid
I mean why it is mentioned
Mohd Zaid
Because we usually mention Model name but in this case it is in string
Mohd Zaid
please help me out guys
William
can anyone tell me what is the meaning of the string "UnitType" here
Here UnitType also another model somewhere in the project models folder or files
William
Ok like in another app ??
No. In the same app
Maxim
Because we usually mention Model name but in this case it is in string
quotes are used because the class itself cannot be used because the class is defined later
Mohd Zaid
compare = models.ManyToManyField("Compare", through='Pages')