ska Package

admin Module

class ska.contrib.django.ska.admin.SignatureAdmin(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

Signature admin.

class Meta[source]
app_label = <django.utils.functional.__proxy__ object at 0x42a2ed0>
SignatureAdmin.fieldsets = ((None, {'fields': ('signature', 'auth_user', 'valid_until')}), (<django.utils.functional.__proxy__ object at 0x42a2dd0>, {'fields': ('created',), 'classes': ('collapse',)}))
SignatureAdmin.list_display = ('signature', 'auth_user', 'valid_until', 'created')
SignatureAdmin.list_filter = ('auth_user',)
SignatureAdmin.media
SignatureAdmin.readonly_fields = ('created',)

backends Module

conf Module

ska.contrib.django.ska.conf.get_setting(setting, override=None)[source]

Get a setting from ska.contrib.django.ska conf module, falling back to the default.

If override is not None, it will be used instead of the setting.

decorators Module

defaults Module

  • UNAUTHORISED_REQUEST_ERROR_MESSAGE (str): Plain text error message. Defaults to “Unauthorised request. {0}”.
  • UNAUTHORISED_REQUEST_ERROR_TEMPLATE (str): Path to 401 template that should be rendered in case of 401 responses. Defaults to empty string (not provided).
  • AUTH_USER (str): Default auth_user for ska.sign_url function. Defaults to “ska-auth-user”.
  • USER_GET_CALLBACK (str): User get callback (when user is fetched in auth backend).
  • USER_CREATE_CALLBACK (str): User create callback (when user is created in auth backend).
  • USER_INFO_CALLBACK (str): User info callback.
  • REDIRECT_AFTER_LOGIN (str): Redirect after login.
  • DB_STORE_SIGNATURES (bool): If set to True, signatures are stored in the database.
  • DB_PERFORM_SIGNATURE_CHECK (bool): If set to True, an extra check is fired on whether the token has already been used or not.

exceptions Module

http Module

class ska.contrib.django.ska.http.HttpResponseUnauthorized(content=u'', *args, **kwargs)[source]

Bases: django.http.response.HttpResponseForbidden

http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#4xx_Client_Error

status_code = 401

models Module

class ska.contrib.django.ska.models.Signature(*args, **kwargs)[source]

Bases: django.db.models.base.Model

Token

Properties :
  • signature (str): Signature generated.
  • auth_user (str): Auth user.
  • valid_until (datetime.datetime): Valid until.
  • created (datetime.datetime): Time added.
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception Signature.MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

Signature.get_next_by_created(*moreargs, **morekwargs)
Signature.get_next_by_valid_until(*moreargs, **morekwargs)
Signature.get_previous_by_created(*moreargs, **morekwargs)
Signature.get_previous_by_valid_until(*moreargs, **morekwargs)
Signature.objects = <django.db.models.manager.Manager object at 0x42a2e50>

settings Module

urls Module

utils Module

ska.contrib.django.ska.utils.purge_signature_data()[source]

Purges old signature data (valid_until < now).

views Module

Subpackages

Read the Docs v: 1.3
Versions
latest
1.3
1.2
1.1
1.0
0.9
0.8
0.7
0.6
0.5
0.4
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.