How to create a where clause using Django models:
insert in to tablename where email=emailaddress
Thank.
I think you are rather looking for an UPDATE option for an existing object.
obj=MyModel.objects.get(email=emailaddress) obj.name = 'xxxx' obj.save()
In case the email address is not unique, which is strange, but suppose you have to use the filter method and the loop for the result
users = MyObject.objects.filter(email=emailaddress) for u in users: # your change here u.is_superuser = True u.save()
Source: https://habr.com/ru/post/1746070/More articles:What is the C # equivalent of this Excel VBA code for Shapes? - c #Jython Cpython Integration - pythonhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1746066/iphone-imageview-layer-maskstobound-leads-to-slow-scrolling&usg=ALkJrhjTb0F8n-AmuMm9wKyge_JwEcB-QAProblems with php xpath - xmlHow to use udev to find information about inserted video resources (like DVD) - pythonHow to change the probability distribution of random variables of SystemVerilog? - system-verilogHow to iterate over an array from a Query of Mysql query - arraysOracle TIMESTAMP w / timezone data type confusion - dateHow to Use InvokeMethod Activity to Add a String to a General List Using Workflow Foundation 4 - .netIn Dynamics AX, using the Business Connector, what do you call kernel functions? - axaptaAll Articles