title: Django restrict views by User permissions which are editable in the Admin
body: <p>I have a Django application where I need to restrict specific <code>Views</code> to subset of <code>Users</code>. I also want to be bale to edit which <code>Users</code> have this permission via the Django Admin. So in the admin I would like to be able to see all users and have a check box which can be checked to give permission to see this specific <code>Views</code>.</p>
  
  <p>I believe the way to approach to this is to a permissions decorator on the <code>Views</code> in question:</p>
  
  <pre><code>from django.contrib.auth.decorators import permission_required
  
  @login_required
  @permission_required('user.can_view_restricted', login_url='/accounts/login/')
  def Restrictedview(request, template_name='restricted.html'):
      ...
      # restricted stuff
  </code></pre>
  
  <p>Now I know I need to define this permission (in permissions.py?), and register it with the Admin. I am unsure of how to do this and how to properly associate the permission with a specific <code>User</code> instance. Should this be an extra field on 'User', or a separate model to hold model to hole Users and Permissions?</p>