hamed
Have you tried using Celery?
No I think I can be handed with out queue
Ashish
Give it a try...with a celery+redis setup. We run a script like that too ...and it works fine...at times, the data is large enough and it takes 30 minutes to 45 minutes to process
Ashish
But it doesn't time out
Ashish
And even works on a basic 4GB ram shared droplet on Digital Ocean
Rohan
Doing that task async in a queue will be much better.
Brutus
can same custom template form be used to edit data as well ??
Brutus
Yes
can you provide some lead
Doragonsureiyā
can you provide some lead
My expertise is sarcastic remarks only.
Brutus
:)
Doragonsureiyā
can you provide some lead
Just read the documentation and do
Charly
can you provide some lead
What you have found on Google?
Brutus
What you have found on Google?
Didn't get anything for same template
Charly
Didn't get anything for same template
Just choose that template in your view
Dev
Can I reorder the api response , in the frontend as per my convenience...?
Anonymous
Guys help please, I have trouble integrating ariadne and django. info.context['request'].user is always anonymous on the playground yet I have logged in from the admin site. How do I get the authenticate user?
Anonymous
I keep getting, cannot assign AnonymousUser object: Post.author must be a User instance.
William
I keep getting, cannot assign AnonymousUser object: Post.author must be a User instance.
It clearly states that the user object you are trying to create/map or update is an unknown user.
Михаил
Hello. I have two tables: users and books. I want to add book from books to user. Where i could write many to many field in users or books?
Adorilson
Hello. I have two tables: users and books. I want to add book from books to user. Where i could write many to many field in users or books?
In user, cause user has books (I guess). Indeed, you put it in the model. In database, this will be two 1:n tables.
Ajay
Hello, I'm just a noob interested towards backend. I've spent more than 3 years teaching Core Python( includes DSA, MySQL connectivity) Just wanted toh learn Backend using Django. Please help me by suggesting books to learn. 🙏
Benjamin
Am having a error caller template_name
Kamronbek
Hi. Custom django exception. handler403. How to display if error message is provided otherwise show the usual error message? current approach which is not working .... def permission_denied_view(request, exception): if not exception.args: raise PermissionDenied template_name = '401.html' template = loader.get_template(template_name) context = { "exception": exception, "request": request } return HttpResponseForbidden(template.render(context), content_type='text/html') ....
Kamronbek
Got stuck on it. Urgent help needed
Doragonsureiyā
Got stuck on it. Urgent help needed
Is it urgent? You shouldn't be here, wasting time and poking strangers and waiting for them to do your job for you. Search on Google/DuckDuckGo, do the research, and solve your problem yourself, nobody here will drop what they're doing to do your job, just because "it's urgent!". Have a nice day! 😉
Рахим
Hi, Is it welcome to create such a large number of files? > api > migrations > __init__.py > admin.py > apps.py > exceptions.py > models.py > other.py > permissions.py > serializers.py > tests.py > urls.py > utils.py > views.py
Ashish
Can I reorder the api response , in the frontend as per my convenience...?
Yes, once you receive the data in the front-end, you can do whatever you want with it
Ashish
It's like you have a lot of books and you want to organize them in different shelves ..your shelves your rules
Dev
?
Ashish
Depends on the frontend you are using
Dev
It's react js
Ashish
There are libraries like Axios to fetch API DATA IN REACT
Ashish
Now it's offtopic and more of a react question than Django
Рахим
I agree
Mirco
It's react js
Go to ot group please
Seun
When looping objects in a model. How can I specify that the loop should display only the first object of the model and not all
Seun
then why loop instead of just getting the firs object?
The thing is I have a grid structure in my template. The grid structure contains 6 boxes. 5 are same in sizes and only one is different in size. So I want to loop but I want 5 out of my objects to go to the five similar boxes and only the objects precisely the first one to be in the one different box
Cuong VN🇻🇳
hello guys
Cuong VN🇻🇳
i got problems with render variables to HTML file in template
Cuong VN🇻🇳
can anyone help me ?
Cuong VN🇻🇳
return render(request, 'counter.html',{'amount': amount_of_words}) >>> amount = 5 in html is : {{amount}}
Cuong VN🇻🇳
and it didnt show up anything
Rajat
Is There Any alternative for heroku. Because i want to deploy a django project and it requires reddis add on. The add on requires credit card verification. But i can't verify account because i have india issued card. Please anyone help me.
Cuong VN🇻🇳
Leonard
{ "non_field_errors": [ "Invalid data. Expected a dictionary, but got list." ] }
Leonard
I'm using mongodb with Django and the driver being used is Djongo here i was trying to serialize my json data to render them on DRF page but got this instead.
Leonard
please anyone?
Leonard
https://dpaste.org/vCGpG
Knowledge
{ "non_field_errors": [ "Invalid data. Expected a dictionary, but got list." ] }
it seems data is required in dictionary form{"key":Value} but being passed as list[]
Leonard
C'mon that is what the message is saying
Leonard
I need solution
No one
What's the big difference between Django 3 and Django 4?
Mirco
What's the big difference between Django 3 and Django 4?
Official documentation -> Release notes and changes
Knowledge
C'mon that is what the message is saying
sorry.. I have not done this..
Neo
I need solution
That is the solution. Rewrite your serializer otherwise
Leonard
That is the solution. Rewrite your serializer otherwise
Can you make me a proper serializer ? Because i already have 2 of them One for my main Order model Second for the OrderItem model And still getting the non_field_error
Knowledge
I need solution
you need to rplace [] with {} in your code check this post. what i told you was correct but was not sure as i have not done it. hope this helps https://stackoverflow.com/questions/66419789/non-field-errors-invalid-data-expected-a-dictionary-but-got-list-in
Anton
Hello! My django project automatic reloads on html/js file change. How to prevent it? I need to reload my project only on python file change. Thanks for your answer
Not
my django project is quiz app. every working is well but database is not store all values at a time, sometime store 2 value and sometime store 3 value. so i don't know why not store all value, so please help me
AAYUSH
can any one help me with decorators...????
Doragonsureiyā
can any one help me with decorators...????
Not until you explain your difficulties.
AAYUSH
https://linkode.org/#rjqvX7IscVUnLzgmbNdFG2
AAYUSH
i want to store the many users i can a print it but something is going wrong so. can you solve that erorr ???
AAYUSH
How is this related to django?
i am creating the user verification code from scratch
Rohan
i am creating the user verification code from scratch
Then read the source code for user auth, learn basics.
Amnas
Did i get a job post in django without a digree. what about when i develop my skills in Django.