aiida.backends.djsite.db package¶
Submodules¶
Module that defines db models.
-
class
aiida.backends.djsite.db.models.
AiidaObjectManager
[source]¶ Bases:
django.db.models.manager.Manager
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
__slotnames__
= []¶
-
-
class
aiida.backends.djsite.db.models.
AiidaQuerySet
(model=None, query=None, using=None, hints=None)[source]¶ Bases:
django.db.models.query.QuerySet
Represent a lazy database lookup for a set of objects.
-
__getitem__
(key)[source]¶ Get item for [] operator
Note: used to rely on the iterator in django 1.8 but does no longer in django 1.11.
-
__iter__
()[source]¶ Iterate for list comprehensions.
Note: used to rely on the iterator in django 1.8 but does no longer in django 1.11.
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
class
aiida.backends.djsite.db.models.
DbAuthInfo
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Table that pairs aiida users and computers, with all required authentication information.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbAuthInfo>¶
-
aiidauser
¶ 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 aForwardManyToOneDescriptor
instance.
-
aiidauser_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
auth_params
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
dbcomputer
¶ 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 aForwardManyToOneDescriptor
instance.
-
dbcomputer_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
enabled
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbAuthInfo
-
exception
-
class
aiida.backends.djsite.db.models.
DbComment
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Class to store comments.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbComment>¶
-
content
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ctime
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
dbnode
¶ 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 aForwardManyToOneDescriptor
instance.
-
dbnode_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_ctime
(*, field=<django.db.models.fields.DateTimeField: ctime>, is_next=True, **kwargs)¶
-
get_next_by_mtime
(*, field=<django.db.models.fields.DateTimeField: mtime>, is_next=True, **kwargs)¶
-
get_previous_by_ctime
(*, field=<django.db.models.fields.DateTimeField: ctime>, is_next=False, **kwargs)¶
-
get_previous_by_mtime
(*, field=<django.db.models.fields.DateTimeField: mtime>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mtime
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbComment
-
user
¶ 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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
aiida.backends.djsite.db.models.
DbComputer
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Table of computers or clusters.
Attributes: * name: A name to be used to refer to this computer. Must be unique. * hostname: Fully-qualified hostname of the host * transport_type: a string with a valid transport type
Note: other things that may be set in the metadata:
mpirun command
num cores per node
max num cores
workdir: Full path of the aiida folder on the host. It can contain the string {username} that will be substituted by the username of the user on that machine. The actual workdir is then obtained as workdir.format(username=THE_ACTUAL_USERNAME) Example: workdir = “/scratch/{username}/aiida/”
allocate full node = True or False
… (further limits per user etc.)
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbComputer>¶
-
dbauthinfo_set
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dbnodes
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
hostname
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbComputer
-
scheduler_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
transport_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
aiida.backends.djsite.db.models.
DbGroup
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
A group of nodes.
Any group of nodes can be created, but some groups may have specific meaning if they satisfy specific rules (for instance, groups of UpdData objects are pseudopotential families - if no two pseudos are included for the same atomic element).
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbGroup>¶
-
dbnodes
¶ 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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
label
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbGroup
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
type_string
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ 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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
aiida.backends.djsite.db.models.
DbLink
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Direct connection between two dbnodes. The label is identifying thelink type.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbLink>¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
input
¶ 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 aForwardManyToOneDescriptor
instance.
-
input_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
label
¶ 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>¶
-
output
¶ 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 aForwardManyToOneDescriptor
instance.
-
output_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
sa
¶ alias of
aldjemy.orm.DbLink
-
type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
aiida.backends.djsite.db.models.
DbLog
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Class to store logs.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbLog>¶
-
dbnode
¶ 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 aForwardManyToOneDescriptor
instance.
-
dbnode_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
levelname
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
loggername
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
message
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
metadata
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbLog
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
aiida.backends.djsite.db.models.
DbNode
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Generic node: data or calculation or code.
Nodes can be linked (DbLink table) Naming convention for Node relationships: A –> C –> B.
A is ‘input’ of C.
C is ‘output’ of A.
Internal attributes, that define the node itself, are stored in the DbAttribute table; further user-defined attributes, called ‘extra’, are stored in the DbExtra table (same schema and methods of the DbAttribute table, but the code does not rely on the content of the table, therefore the user can use it at his will to tag or annotate nodes.
- Note
Attributes in the DbAttribute table have to be thought as belonging to the DbNode, (this is the reason for which there is no ‘user’ field in the DbAttribute field). Moreover, Attributes define uniquely the Node so should be immutable.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbNode>¶
-
aiidaobjects
= <aiida.backends.djsite.db.models.AiidaObjectManager object>¶
-
attributes
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
ctime
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
dbcomments
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dbcomputer
¶ 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 aForwardManyToOneDescriptor
instance.
-
dbcomputer_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
dbgroups
¶ 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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dblogs
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
extras
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_ctime
(*, field=<django.db.models.fields.DateTimeField: ctime>, is_next=True, **kwargs)¶
-
get_next_by_mtime
(*, field=<django.db.models.fields.DateTimeField: mtime>, is_next=True, **kwargs)¶
-
get_previous_by_ctime
(*, field=<django.db.models.fields.DateTimeField: ctime>, is_next=False, **kwargs)¶
-
get_previous_by_mtime
(*, field=<django.db.models.fields.DateTimeField: mtime>, is_next=False, **kwargs)¶
-
get_simple_name
(invalid_result=None)[source]¶ Return a string with the last part of the type name.
If the type is empty, use ‘Node’. If the type is invalid, return the content of the input variable
invalid_result
.- Parameters
invalid_result – The value to be returned if the node type is not recognized.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
input_links
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
inputs
¶ 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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
label
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mtime
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
node_type
¶ 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>¶
-
output_links
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
outputs
¶ 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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
process_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
sa
¶ alias of
aldjemy.orm.DbNode
-
user
¶ 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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
class
aiida.backends.djsite.db.models.
DbSetting
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This will store generic settings that should be database-wide.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbSetting>¶
-
classmethod
del_value
(key, only_children=False, subspecifier_value=None)[source]¶ Set a setting value.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_description
()[source]¶ This can be called on a given row and will get the corresponding description.
-
get_next_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=True, **kwargs)¶
-
get_previous_by_time
(*, field=<django.db.models.fields.DateTimeField: time>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
key
¶ 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>¶
-
sa
¶ alias of
aldjemy.orm.DbSetting
-
classmethod
set_value
(key, value, with_transaction=True, subspecifier_value=None, other_attribs=None, stop_if_existing=False)[source]¶ Delete a setting value.
-
time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
val
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
aiida.backends.djsite.db.models.
DbUser
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Class that represents a user as the owner of a specific Node.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
-
REQUIRED_FIELDS
= ()¶
-
USERNAME_FIELD
= 'email'¶
-
__module__
= 'aiida.backends.djsite.db.models'¶
-
_meta
= <Options for DbUser>¶
-
dbauthinfo_set
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dbcomment_set
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dbgroups
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dbnodes
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
email
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
first_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
institution
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_anonymous
= False¶
-
is_authenticated
= True¶
-
last_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>¶
-
sa
¶ alias of
aldjemy.orm.DbUser
-
exception
-
aiida.backends.djsite.db.models.
suppress_auto_now
(list_of_models_fields)[source]¶ This context manager disables the auto_now & editable flags for the fields of the given models. This is useful when we would like to update the datetime fields of an entry bypassing the automatic set of the date (with the current time). This is very useful when entries are imported and we would like to keep e.g. the modification time that we set during the import and not allow Django to set it to the datetime that corresponds to when the entry was saved. In the end the flags are returned to their original value. :param list_of_models_fields: A list of (model, fields) tuples for which the flags will be updated. The model is an object that corresponds to the model objects and fields is a list of strings with the field names.
Base class for AiiDA tests
-
class
aiida.backends.djsite.db.testbase.
DjangoTests
[source]¶ Bases:
aiida.backends.testimplbase.AiidaTestImplementation
Automatically takes care of the setUpClass and TearDownClass, when needed.
-
__abstractmethods__
= frozenset({})¶
-
__module__
= 'aiida.backends.djsite.db.testbase'¶
-
_abc_impl
= <_abc_data object>¶
-