oauth2_client/management/commands/oauth2_app_maker.py
def _validate(model_type):
        """
        Validate provided application model type.

        Args:
            model_type (type): e.g. oauth2_client.models.Application

        Returns:
            None:

        Raises:
            ValidationError: 1) when model type is wrong; 2) when not all required fields available
            on the model type
        """
        if not issubclass(model_type, models.Model):
            raise ValidationError('The model class must extend django.db.models.Model')
        app_fields = [field.name for field in model_type._meta.fields]  # get field names
        required_fields = {'name', 'updated'}
        if any([required_field not in app_fields for required_field in required_fields]):
            raise ValidationError(
                'Your app model does not provide all required fields. Required fields: {} '
                'Found fields: {}'.format(required_fields, app_fields)
            )

        Validate provided application model type.

        Args:
            model_type (type): e.g. oauth2_client.models.Application

        Returns:
            None:

        Raises:
            ValidationError: 1) when model type is wrong; 2) when not all required fields available
            on the model type
        
Validate provided application model type.



1) when model type is wrong; 2) when not all required fields available
on the model type
Validate provided application model type . 1 ) when model type is wrong ; 2 ) when not all required fields available on the model type
def _validate(model_type):
        if not issubclass(model_type, models.Model):
            raise ValidationError('The model class must extend django.db.models.Model')
        app_fields = [field.name for field in model_type._meta.fields]  
        required_fields = {'name', 'updated'}
        if any([required_field not in app_fields for required_field in required_fields]):
            raise ValidationError(
                'Your app model does not provide all required fields. Required fields: {} '
                'Found fields: {}'.format(required_fields, app_fields)
            )
def _validate ( model_type ) : if not issubclass ( model_type , models . Model ) : raise ValidationError ( 'The model class must extend django.db.models.Model' ) app_fields = [ field . name for field in model_type . _meta . fields ] required_fields = { 'name' , 'updated' } if any ( [ required_field not in app_fields for required_field in required_fields ] ) : raise ValidationError ( 'Your app model does not provide all required fields. Required fields: {} ' 'Found fields: {}' . format ( required_fields , app_fields ) )
Validate provided application model type.
Validate provided application model type .
"""
        Validate provided application model type.

        Args:
            model_type (type): e.g. oauth2_client.models.Application

        Returns:
            None:

        Raises:
            ValidationError: 1) when model type is wrong; 2) when not all required fields available
            on the model type
        """ # get field names
model_type