Jump to >

reviewboard.hostingsvcs.models

class HostingServiceAccount(id, service_name, hosting_url, username, data, visible, local_site)[source]

Bases: django.db.models.base.Model

service_name[source]

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

hosting_url[source]

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

username[source]

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

data[source]

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

visible[source]

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

local_site[source]

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

objects = <reviewboard.hostingsvcs.managers.HostingServiceAccountManager object>[source]
__str__()[source]
service[source]
is_authorized[source]
is_accessible_by(user)[source]

Returns whether or not the user has access to the account.

The account is accessible by the user if the user has access to the local site.

is_mutable_by(user)[source]

Returns whether or not the user can modify or delete the account.

The acount is mutable by the user if the user is an administrator with proper permissions or the account is part of a LocalSite and the user has permissions to modify it.

accept_certificate(certificate)[source]

Accept the SSL certificate for the linked hosting URL.

Parameters:certificate (reviewboard.scmtools.certs.Certificate) – The certificate to accept.
Raises:ValueError – The certificate data did not include required fields.
__unicode__()[source]
get_data_json()[source]
id[source]

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

local_site_id[source]

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

repositories[source]

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

set_data_json(json)[source]