tldap.django package#

Subpackages#

Submodules#

tldap.django.apps module#

class tldap.django.apps.TldapConfig(app_name, app_module)[source]#

Bases: AppConfig

label = 'tldap'#
name = 'tldap.django'#
verbose_name = 'TLDAP Django Support'#

tldap.django.helpers module#

Django specific database helper functions.

tldap.django.helpers.save_account(changes: Changeset, table: Type[LdapObject], database: Database) Changeset[source]#

Modify a changes to add an automatically generated uidNumber.

tldap.django.helpers.save_group(changes: Changeset, table: Type[LdapObject], database: Database) Changeset[source]#

Modify a changes to add an automatically generated gidNumber.

tldap.django.middleware module#

Transaction middleware for Django.

class tldap.django.middleware.TransactionMiddleware(get_response)[source]#

Bases: MiddlewareMixin

Transaction middleware. If this is enabled, each view function will be run with commit_on_response activated - that way a save() doesn’t do a direct commit, the commit is done when a successful response is created. If an exception happens, the database is rolled back.

process_exception(request, exception)[source]#

Rolls back the database and leaves transaction management

process_request(request)[source]#

Enters transaction management

process_response(request, response)[source]#

Commits and leaves transaction management.

tldap.django.models module#

DB model for a counter to keep track of next uidNumber and gidNumber to use for new LDAP objects.

class tldap.django.models.Counters(*args, **kwargs)[source]#

Bases: Model

Keep track of next uidNumber and gidNumber to use for new LDAP objects.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

count#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod get_and_increment(scheme, name, default, test)[source]#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

name#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
scheme#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Module contents#

Django function support.