title: Django, how to make a view atomic?
body: <p>I have a simple django app to simulate a stock market, users come in and buy/sell. When they choose to trade, </p>
  
  <ol>
  <li>the market price is read, and</li>
  <li>based on the buy/sell order the market price is increased/decreased.</li>
  </ol>
  
  <p>I'm not sure how this works in django, but is there a way to make the view atomic? i.e. I'm concerned that user A's actions may read the price but before it's updated because of his order, user B's action reads the price.</p>
  
  <p>Couldn't find a simple, clean solution for this online. Thanks.</p>