title: Django select_for_update cannot be used outside of a transaction
body: <p>I was using Django 1.5.1 and upgraded to Django 1.6.6.</p>
  
  <p>In Django 1.5.1 I was using select for update to guarantee atomic execution.</p>
  
  <pre><code>job_qs = Job.objects.select_for_update().filter(pk=job.id)
  for job in job_qs:
  </code></pre>
  
  <p>Unfortunately this now throws an error:</p>
  
  <pre><code>  File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/query.py", line 96, in __iter__
      self._fetch_all()
  
    File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/query.py", line 857, in _fetch_all
      self._result_cache = list(self.iterator())
  
    File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/query.py", line 220, in iterator
      for row in compiler.results_iter():
  
    File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 713, in results_iter
      for rows in self.execute_sql(MULTI):
  
    File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 776, in execute_sql
      sql, params = self.as_sql()
  
    File "/srv/venvs/django-picdoc/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 147, in as_sql
      raise TransactionManagementError("select_for_update cannot be used outside of a transaction.")
  
  TransactionManagementError: select_for_update cannot be used outside of a transaction.
  </code></pre>
  
  <p>What are some of the solutions for solving this?</p>