django_aws_api_gateway_websockets.admin module

class django_aws_api_gateway_websockets.admin.ApiGatewayAdditionalRouteAdmin(model, admin_site)[source]

Bases: ModelAdmin

autocomplete_fields = ['api_gateway']
date_hierarchy = 'created_on'
get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

list_display = ['name', 'api_gateway', 'route_key', 'integration_url', 'deployed']
list_filter = ['api_gateway']
property media
search_fields = ['name', 'key']
class django_aws_api_gateway_websockets.admin.ApiGatewayAdditionalRouteInline(parent_model, admin_site)[source]

Bases: TabularInline

autocomplete_fields = ['api_gateway']
extra = 1
get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

property media
model

alias of ApiGatewayAdditionalRoute

class django_aws_api_gateway_websockets.admin.ApiGatewayAdmin(model, admin_site)[source]

Bases: ModelAdmin

actions = [<function create_api_gateway>, <function create_custom_domain>]
date_hierarchy = 'created_on'
get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

inlines = [<class 'django_aws_api_gateway_websockets.admin.ApiGatewayAdditionalRouteInline'>]
list_display = ['api_name', 'domain_name', 'default_channel_name', 'api_id', 'api_endpoint', 'api_gateway_domain_name', 'api_created', 'custom_domain_created', 'created_on', 'updated_on']
list_filter = ['api_created', 'custom_domain_created']
property media
search_fields = ['domain_name', 'api_name']
class django_aws_api_gateway_websockets.admin.ConnectionRateLimitAdmin(model, admin_site)[source]

Bases: ModelAdmin

date_hierarchy = 'attempt_time'
has_add_permission(request)[source]

Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.

has_change_permission(request, obj=None)[source]

Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.

list_display = ('ip_address', 'user', 'attempt_time', 'successful')
list_filter = ('successful', 'attempt_time')
property media
readonly_fields = ('ip_address', 'user', 'attempt_time', 'successful')
search_fields = ('ip_address', 'user__username', 'user__email')
class django_aws_api_gateway_websockets.admin.WebSocketSessionAdmin(model, admin_site)[source]

Bases: ModelAdmin

autocomplete_fields = ['user']
date_hierarchy = 'created_on'
get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

list_display = ['connection_id', 'channel_name', 'api_gateway', 'user', 'connected', 'request_count', 'created_on', 'updated_on']
list_filter = ['connected', 'channel_name']
property media
search_fields = ['connection_id', 'channel_name']
class django_aws_api_gateway_websockets.admin.WebSocketTokenAdmin(model, admin_site)[source]

Bases: ModelAdmin

has_add_permission(request)[source]

Return True if the given request has permission to add an object. Can be overridden by the user in subclasses.

has_change_permission(request, obj=None)[source]

Return True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.

Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to change the obj model instance. If obj is None, this should return True if the given request has permission to change any object of the given type.

list_display = ('token_preview', 'user', 'session_key', 'created_at', 'used')
list_filter = ('used', 'created_at')
property media
readonly_fields = ('token', 'user', 'session_key', 'created_at', 'used')
search_fields = ('user__username', 'user__email', 'session_key')
token_preview(obj)[source]

Show only first 16 characters of token for security

django_aws_api_gateway_websockets.admin.create_api_gateway(modeladmin, request, queryset)[source]

Creates the API Gateway record if one does not already exist

django_aws_api_gateway_websockets.admin.create_custom_domain(self, request, queryset)[source]

Using the queryset, call the create_custom_domain method to create a custom domain