title: How to allow only one User to see "UpdateView"?
body: <p>I have a <code>Users</code> and <code>Jobs</code>. If some <code>User</code> creates a <code>Job</code>, then and only then he/she can edit some information of this <code>Job</code>. </p>
  
  <p>So he visits the url <code>.../job/update/&lt;id&gt;</code>. If the <code>Job</code> is created by him (the <code>User</code> is a <code>ForeignKey</code> in <code>Job</code>, then he can modify data. Otherwise he gets <code>404</code> error.</p>
  
  <p>In <code>view</code> function, I would probably get current <code>User</code>s <code>id</code> and compare this <code>id</code> to <code>Jobs</code> <code>ForeignKey</code>. </p>
  
  <p>But there are many patterns and shortcuts in <code>class views</code> so I'm curious how to do that this way. </p>
  
  <pre><code>class EditOrderView(UpdateView):
      model = Job
      fields = ['language_from','language_to','level','short_description','notes',
                'text_to_translate','file']
      template_name = 'auth/jobs/update-order.html'
  
  
  class Job(models.Model):
      customer = models.ForeignKey(User, related_name='orders', help_text=u"Zákazník")
      translator = models.ForeignKey(User, related_name='jobs', null=True, blank=True, help_text=u"Prekladateľ")
      price = models.FloatField(null=True, blank=True, help_text=u"Cena")
  
      language_from = models.ForeignKey(Language, related_name='jobs_from', null=True)
      language_to = models.ForeignKey(Language, related_name='jobs_to', null=True)
      ...
  </code></pre>