'Create an oauth client application that is public.'

def create_public_client(self, name, user, redirect_uri, client_id=None):

    return models.Application.objects.create(name=name, user=user, client_id=client_id, client_type=models.Application.CLIENT_PUBLIC, authorization_grant_type=models.Application.GRANT_PASSWORD, redirect_uris=redirect_uri)
