Skip to content
Advertisement

Tag: django

Why Can’t I Add Azure DB Extension on Mac?

I am following this guide: https://learn.microsoft.com/en-us/azure/app-service/tutorial-python-postgresql-app?tabs=bash%2Cclone&pivots=postgres-single-server After successfully completing Step 1 and Step 2, I get to Step 3: “Install the db-up extension for the Azure CLI: az extension add –name db-up” Yet, when I run this command, I receive the following output: Any ideas here? I’ve tried some of the solutions to similar errors I’ve found on Stack/GitHub, but

django custom function for filter query

I’ve a field in my model called, test_data = models.TextField(…), and the model is called MyOrm and this test_data contains data which is actually string, some holds JSON data, and some reference to blob-url. Now I’m trying to streamline my data. So I want to filter all the MyOrm object whose test_data ain’t JSON. I’m just storing/trying to store some

Flitering django queryset based on ManyToManyField

In my Request model, there is a field requested_to which is a ManyToManyField I want to filter queryset of Request model where a organization_user is not in requested_to Answer You can filter with: Django makes LEFT OUTER JOINs when you filter on a ManyToManyField (or a reverse ForeignKey), so here we exclude all Requests where organization_user is a member of

Django – store.models.Customer.MultipleObjectsReturned: get() returned more than one Customer — it returned 2″

I am trying to make an e-commerce website where “AnonymousUser” or Guest user can order and check out products by providing their name, email, and address. But after clicking the “Make Payment” button, my terminal was having an error that says “store.models.Customer.MultipleObjectsReturned: get() returned more than one Customer — it returned 2!” When I try to login and do the

Advertisement