Multiple save in model object django
<p>I use driver cassandra for my db backend in django , here is my problem :</p>

<p>when I wanna run multiple save in a model object instance , the first one save successfully but the others save wont update my record , here is a example :</p>

<pre><code>obj = Mymodel.objects.get(id=2)

obj.field1 = 2
obj.save()

obj.field2 = 3
obj.save() # this save don't work
</code></pre>

<p>am I doying right or for every update i should refresh my model object like this :</p>

<pre><code>obj = Mymodel.objects.get(id=obj.id)
</code></pre>

<p>regards</p>

<p>Use <code>refresh_from_db</code> method on <code>obj</code> after first save. <a href="https://docs.djangoproject.com/en/1.8/ref/models/instances/#refreshing-objects-from-database" rel="nofollow">Link to docs</a></p>

<pre><code>obj.refresh_from_db()
</code></pre>

python django cassandra