Skip to content
Advertisement

Tag: django

Error in making POST request to django API

From post man, I’m trying to make POST request to an order API created using django restframework but I’m getting the following error: The specific point where the error is located is specified in the error but I find difficulty constructing VALID json for the request body. Here is how I’m making the request on postman: Here is the program:

Django upload multiple images per post

I want to let the user upload multiple images per post. Similarly to an e-commerce platform with multiple images per product. But till now the images are not sent to the database. That’s my code so far: models.py: forms.py: views.py: project_form.html: settings.py: project urls.py app urls.py Answer Issue: You have made ProjectForm which relates to Project model, but the image

Django celery error while adding tasks to RabbitMQ message queue : AttributeError: ‘ChannelPromise’ object has no attribute ‘__value__’

I have setup celery, rabbitmq and django web server on digitalocean. RabbitMQ runs on another server where my Django app is not running. When I am trying to add the tasks to the queue using delay I am getting an error AttributeError: ‘ChannelPromise’ object has no attribute ‘value’ From django shell I am adding the task to my message queue.

Can’t pass parameters in Django, giving MultiValueDictKeyError

I have gone through answers of this type of question but they don’t seem relevant for my problem. I have a class defined as follows: It also requires other inputs: params[“meta”][“xgb”] params[“combined”] And I pass them as follows: I try the same in Postman by putting all these parameters in “Body” (using “raw”) but get: Need help. Thanks. Answer

Advertisement