parameters: (sender, **kwargs)
docstring: This syncdb hooks takes care of adding a view permission too all our
      content types.
docstring_summary: This syncdb hooks takes care of adding a view permission too all our
      content types.
docstring_tokens: This syncdb hooks takes care of adding a view permission too all our content types .
function: def add_view_permissions(sender, **kwargs):
      """
      This syncdb hooks takes care of adding a view permission too all our
      content types.
      """
      # for each of our content types
      for content_type in ContentType.objects.all():
          # build our permission slug
          codename = "view_%s" % content_type.model
  
          # if it doesn't exist..
          if not Permission.objects.filter(content_type=content_type, codename=codename):
              # add it
              Permission.objects.create(content_type=content_type,
                                        codename=codename,
                                        name="Can view %s" % content_type.name)
function_tokens: def add_view_permissions ( sender , * * kwargs ) : # for each of our content types for content_type in ContentType . objects . all ( ) : # build our permission slug codename = "view_%s" % content_type . model # if it doesn't exist.. if not Permission . objects . filter ( content_type = content_type , codename = codename ) : # add it Permission . objects . create ( content_type = content_type , codename = codename , name = "Can view %s" % content_type . name )