#NEWLINE# def is_valid( self ) : #NEWLINE# #INDENT# "Returns whether or not the form is valid.\n\n        This will return True if the form fields are all valid, if there's\n        no certificate error, host key error, and if the form isn't\n        being re-displayed after canceling an SSH key or HTTPS certificate\n        verification.\n\n        This also takes into account the validity of the hosting service form\n        for the selected hosting service and repository plan.\n        " #NEWLINE# if ( not super ( RepositoryForm , self ) . is_valid ( ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# hosting_type = self . cleaned_data [ 'hosting_type' ] #NEWLINE# plan = ( self . cleaned_data [ 'repository_plan' ] or self . DEFAULT_PLAN_ID ) #NEWLINE# return ( ( not self . hostkeyerror ) and ( not self . certerror ) and ( not self . userkeyerror ) and ( not self . bug_tracker_host_error ) and ( not self . cleaned_data [ 'reedit_repository' ] ) and ( ( hosting_type not in plan . repository_forms ) or self . repository_forms [ hosting_type ] [ plan ] . is_valid ( ) ) )