conflicts.models module

class conflicts.models.ConflictOfInterest(*args, **kwargs)[source]

Bases: django.db.models.base.Model

A flagged relation between two scientists that could be conflicting in a refereeing phase.

STATUS_UNVERIFIED = 'unverified'
STATUS_VERIFIED = 'verified'
STATUS_DEPRECATED = 'deprecated'
CONFLICT_OF_INTEREST_STATUSES = (('unverified', 'Unverified'), ('verified', 'Verified by Admin'), ('deprecated', 'Deprecated'))
TYPE_OTHER = 'other'
TYPE_COAUTHOR = 'coauthor'
TYPE_COWORKER = 'coworker'
COI_TYPES = (('coworker', 'Co-worker'), ('coauthor', 'Co-authorship'), ('other', 'Other'))
status

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

type

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

profile

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.

related_profile

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.

related_submissions

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

header

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

url

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

comment

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

created

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

modified

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.ManagerFromConflictOfInterestQuerySet object>
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
id

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

profile_id
related_profile_id