Skip to content

Tag: django

Django: how to write django signal to update field in django?

i want to write a simple django signal that would automatically change the status of a field from live to finished, when i check a button completed. I have a model that looks like this when i check the won button that is in the PredictionData model, i want to immediately changes the status of the Prediction t…

Django – CRUD functionality, Edit Profile Details

I am new to Django but I am creating a Realtor application, I would like the user to be able to update their details using CRUD functionality in the UI. But I can’t get my request to work: Heres is my code (views.py): Then here is (urls.py) ] Lastly, here is my code snippet from the requested link in th…

Query unique values inside django forloop

I have a query where I should avoid double entry of the same question. In fact, I would like to get only unique values but, I am using the distinct() django function which isn’t working. I have these models: and the query is: What I would like to achieve is to have all different questions for each diffe…

How to fix website picture problem on HTML

Is there a problem with this code I tried reformatting the code, by replacing the products.url into the alt brackets. But it was what i typed on in the brackets that showed up. Answer I am not exactly sure what your problem is but I see problem in code, try replacing: to and then update this lines with new va…