Kumar Shreyansh
Manikanta
Shear
Do you have the image installed?
Yeah I do have both Dockerfile and docker-compose file on my project. Im try to access postgres via docker exec bash hence the error role 'postgres' doesn't exist
Rohan
Rohan
And what are you trying to do exactly? Trying to access db service from where?
Muflone
Vaibhav
🄰🄼🄸🅁
Hi I want to install the pillow library but i got this error
ERROR : Could not find a version that satisfies the requirement pillow ( from versions : none ) ERROR : No matching distribution found for pillow
Mirco
Kaustab Roy_C_24_CSE(AIML)
upon migration I am getting this error, can anyone help me with this error?
django.db.utils.OperationalError: (1054, "Unknown column 'sapp1_user.udept_id' in 'field list'")
Targoon
Kaustab Roy_C_24_CSE(AIML)
Targoon
Doragonsureiyā
can i msg u?
Can i send you a private message?
No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
Kaustab Roy_C_24_CSE(AIML)
Kaustab Roy_C_24_CSE(AIML)
of course
i will after sometime okay
Doragonsureiyā
cannot send images heerer
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Shear
Guys how does one handles media file when debug is false
Targoon
Adarsh
hey guys can you help me with this problem actually i want to iterate this values on frontend page using for loop but when i iterate this value they give me empty data
Adarsh
[{'question': 'What is the most common type of data analysis?', 'answers': ['Descriptive Analysis', 'Predictive Analysis', 'Prescriptive Analysis', 'Exploratory Analysis'], 'rightanswer': 'Descriptive Analysis'}, {'question': 'What is the purpose of data analysis?', 'answers': ['To identify patterns and trends in data', 'To make predictions about future events', 'To make decisions based on data', 'All of the above'], 'rightanswer': 'All of the above'}, {'question': 'What is the most important step in data analysis?', 'answers': ['Data Cleaning', 'Data Visualization', 'Data Modeling', 'Data Collection'], 'rightanswer': 'Data Cleaning'}, {'question': 'What is the most common type of data analysis tool?', 'answers': ['Spreadsheet Software', 'Statistical Software', 'Data Mining Software', 'Data Visualization Software'], 'rightanswer': 'Data Visualization Software'},] this is sample
vaseem cholakkan
hy how can i use drf serializer inside a asyncconsumer iam getting an error saying : you cannot call this from an async context, need to use @database_sync_to_async ? if so where ?
Anonymous
where can I host my django project for free just want to test something
Targoon
Targoon
D.
Hi everybody
D.
Now, i need a django project , tanks everybody
vaseem cholakkan
how can i show a user is online on a websocket consumer ?
Amit
Anonymous
I wanted to make an update profile function where users can update their data by filling a form. My website is running well without any error, but whenever I fill up the form & hit submit the profile doesn't update itself & also new data is not saving here is my function in
views.py:
def updateProfile(request):
if request.method == 'POST':
profile_form = updateProfile(request.POST, instance=request.user.profile)
if profile_form.is_valid():
profile_form.save()
return redirect('profile')
else:
profile_form = UserProfile(instance=request.user.profile)
return render(request, 'profile.html', {'profile_form': profile_form})
P.S.: I'm a beginner.
Kumar Shreyansh
Kumar Shreyansh
Anonymous
IGA
hi can someone help me
do i need to activate (source myvenv/bin/activate) my venv every time before working on it? Becouse when i am not activating it my project not working correctly
Faraz
IGA
Arash
Hello, I have a question
I have to save some data in the database when the project is started, so I wrote it in the apps.py file related to it (method ready).
Now, when I use pytest, it seems that this method is not executed!
Do you know the reason and solution?
Doragonsureiyā
vijay
PraK
guys anyone worked on a simple products page like pet adaption platform etc?
Berkay
Hello everyone, Can anyone suggest a Django course for beginners?
Anonymous
https://stackoverflow.com/questions/76842859/having-issue-to-update-user-profile-in-django
Anonymous
Help me please...
Targoon
Kumar Shreyansh
how do you pass info as json?
Hi, you need to import the Json response module
from django.http import JsonResponse
Then you need to return JsonResponse, and pass the required data in the form of a dictionary. If you are passing a queryset, you convert it to list, before passing it through the function.
Kumar Shreyansh
In this case, you need a javascript function in the front end to handle the response. I use jquery to do the same.
Targoon
Targoon
Kumar Shreyansh
Kumar Shreyansh
A piece of experience, even though i started learning django two months ago:
I recently started using modelforms, minus the fact that i need to define class and id for each field separately which is quite tedious, it's really good. I have started using jquery to handle form submission and made a single function view for creating or updating the data which reduced a lot of time. The only hard part is to set the data in the form again when you are updating a record.
Kumar Shreyansh
Well in this case, i have been given a form with 5 models, and 20 columns per model. Is there an easy way to handle the submission of all the data when you are trying to update the model? There is an employee code which is common to all the models.
Dlight
Hey guys, I posted this question on stackoverflow no answer. Appreciate the help.
I'm using CustomUser ( AbstractUser )
In Signup form I just want to have Email , no password . After we send a confirmation email , user can set the password how can I remove password in Sign up form?
Dlight
ƑѦⴽⵊⵠƲƝ
I've got problem on API REST Framework I can't get access from remote machine but i set true to allow all access and i run manage.py runserver [my_ip] but still can't get access
cj
Dlight
PraK
mani
Could you please tell me how can I generate a pdf in Django using restapi
Dlight
vijay
vijay
Yes u can
vijay
Djsngo is also python
JairamJavv
Hi folks, I am trying to deploy my Django project for the first time. It has a NoSQL database connected and just storing and retrieving my data. Which service should I choose? I need some help in deploying my project, please can anyone help me out?
Ashraf
Hi everyone.
What's the best server for hosting web site Django and database postgreSQL?.
What is the average cost?.
Soham
Anonymous
Can anyone say what is the fault in this function?
https://codeshare.io/N3zPx4