oauth2_client/management/commands/oauth2_app_maker.py
def handle(self, *args, **options):
        """
        Django hook to run the command.
        Dynamically extract all command's parameters related to the application, based on the model's
        type metadata. This works now and in the future, with any Application models. Run the logic,
        report errors if any, re-raise so user gets a non-zero exit code if execution fails.
        """
        app_model = self.app_model()
        self._validate(app_model)
        application_fields = [field.name for field in app_model._meta.fields]  # get field names
        application_data = {}
        is_update = options.pop('update')
        for arg_name, arg_value in options.items():
            if self._filter_cmd_argument(arg_name, arg_value, application_fields, is_update):
                application_data[arg_name] = arg_value

        try:
            if is_update:
                self._update(application_data)
            else:
                self._create(application_data)
        except ValidationError as exc:
            errors = "\n".join(
                ["- {}: {}".format(err_key, err_value) for err_key, err_value in exc.message_dict.items()]
            )
            self.logger.error('Please correct the following validation errors:\n %s', errors)
            raise

        Django hook to run the command.
        Dynamically extract all command's parameters related to the application, based on the model's
        type metadata. This works now and in the future, with any Application models. Run the logic,
        report errors if any, re-raise so user gets a non-zero exit code if execution fails.
        
Django hook to run the command.
Dynamically extract all command's parameters related to the application, based on the model's
type metadata. This works now and in the future, with any Application models. Run the logic,
report errors if any, re-raise so user gets a non-zero exit code if execution fails.
Django hook to run the command . Dynamically extract all command ' s parameters related to the application based on the model ' s type metadata . This works now and in the future with any Application models . Run the logic report errors if any re - raise so user gets a non - zero exit code if execution fails .
def handle(self, *args, **options):
        app_model = self.app_model()
        self._validate(app_model)
        application_fields = [field.name for field in app_model._meta.fields]  
        application_data = {}
        is_update = options.pop('update')
        for arg_name, arg_value in options.items():
            if self._filter_cmd_argument(arg_name, arg_value, application_fields, is_update):
                application_data[arg_name] = arg_value
        try:
            if is_update:
                self._update(application_data)
            else:
                self._create(application_data)
        except ValidationError as exc:
            errors = "\n".join(
                ["- {}: {}".format(err_key, err_value) for err_key, err_value in exc.message_dict.items()]
            )
            self.logger.error('Please correct the following validation errors:\n %s', errors)
            raise
def handle ( self , * args , ** options ) : app_model = self . app_model ( ) self . _validate ( app_model ) application_fields = [ field . name for field in app_model . _meta . fields ] application_data = { } is_update = options . pop ( 'update' ) for arg_name , arg_value in options . items ( ) : if self . _filter_cmd_argument ( arg_name , arg_value , application_fields , is_update ) : application_data [ arg_name ] = arg_value try : if is_update : self . _update ( application_data ) else : self . _create ( application_data ) except ValidationError as exc : errors = "\n" . join ( [ "- {}: {}" . format ( err_key , err_value ) for err_key , err_value in exc . message_dict . items ( ) ] ) self . logger . error ( 'Please correct the following validation errors:\n %s' , errors ) raise
Django hook to run the command.
Django hook to run the command .
"""
        Django hook to run the command.
        Dynamically extract all command's parameters related to the application, based on the model's
        type metadata. This works now and in the future, with any Application models. Run the logic,
        report errors if any, re-raise so user gets a non-zero exit code if execution fails.
        """ # get field names
self