openedx.core.djangoapps.api_admin.management.commands package#

Submodules#

openedx.core.djangoapps.api_admin.management.commands.create_api_access_request module#

Management command to create an ApiAccessRequest for given users

class openedx.core.djangoapps.api_admin.management.commands.create_api_access_request.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Create an ApiAccessRequest for the given user

Example usage:

$ ./manage.py lms create_api_request <username> –create-config

DEFAULT_REASON = 'Generated by management job create_api_request'#
DEFAULT_WEBSITE = 'www.test-edx-example-website.edu'#
add_arguments(parser)#

Entry point for subclassed commands to add custom arguments.

create_api_access_config()#

Creates an active ApiAccessConfig if one does not currectly exist

create_api_access_request(user, status, reason, website)#

Creates an ApiAccessRequest with the given values.

get_user(username)#
handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

help = 'Create an ApiAccessRequest for the given user'#
openedx.core.djangoapps.api_admin.management.commands.create_api_access_request.disconnect_request_email_signals()#

Context manager to be used for temporarily disconnecting the send_request_email and send_decision_email pre/post_save signal receivers from the ApiAccessRequest model.

Module contents#