def add_view_permissions(sender, **kwargs):
 for content_type in ContentType.objects.all():
  codename = ('view_%s' % content_type.model)
  if (not Permission.objects.filter(content_type=content_type, codename=codename)):
   Permission.objects.create(content_type=content_type, codename=codename, name=('Can view %s' % content_type.name))

def add_view_permissions ( sender , ** kwargs ) : for content_type in ContentType . objects . all ( ) : codename = ( 'view_%s' % content_type . model ) if ( not Permission . objects . filter ( content_type = content_type , codename = codename ) ) : Permission . objects . create ( content_type = content_type , codename = codename , name = ( 'Can view %s' % content_type . name ) )
this syncdb hooks takes care of adding a view permission too all our content types .