#NEWLINE# def __init__( self , user , * args , **kwargs ) : #NEWLINE# #INDENT# 'Sets allowed values' #NEWLINE# super ( ServiceForm , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# manager = Service . objects #NEWLINE# if ( 'instance' in instance ) : #NEWLINE# #INDENT# instance = kwargs [ 'instance' ] #NEWLINE# manager = manager . exclude ( ( Q ( parent = instance ) & Q ( pk = instance . id ) ) ) #NEWLINE# #UNINDENT# self . fields [ 'parent' ] . queryset = Object . filter_permitted ( user , manager , mode = 'x' ) #NEWLINE# self . fields [ 'name' ] . label = _ ( 'Name' ) #NEWLINE# self . fields [ 'parent' ] . label = _ ( 'Parent' ) #NEWLINE# self . fields [ 'details' ] . label = _ ( 'Details' )