I have saved an object with .save()
and I would like to get the id to update it after saving it, do you know any way to make a query on the same generated instance of the object.
I have tried the following code but it does not update me.
dash.save()
Dashboard.objects.filter(pk=dash).update(userInstance=userInstance)
I don't quite understand what you're trying to do. If you want to update
userInstance
(which I assume is a field of your modelDashboard
) you just have to use the instance you have at hand:once you record you can manipulate the data directly.
example:
Hello, it's simple, nothing is needed, just access the id attribute:
Cheers