beat.web.code.models module¶
-
class
beat.web.code.models.CodeManager[source]¶ Bases:
beat.web.common.models.StoredContributionManager-
create_object(author, name, short_description='', description='', declaration=None, code=None, version=1, previous_version=None, fork_of=None)[source]¶
-
-
beat.web.code.models.AccessibilityInfo¶ alias of
beat.web.code.models.Accessibility
-
class
beat.web.code.models.Code(*args, **kwargs)[source]¶ Bases:
beat.web.common.models.StoredContribution-
UNKNOWN= 'U'¶
-
CXX= 'C'¶
-
MATLAB= 'M'¶
-
PYTHON= 'P'¶
-
R= 'R'¶
-
CODE_LANGUAGE= (('U', 'Unknown'), ('C', 'Cxx'), ('M', 'Matlab'), ('P', 'Python'), ('R', 'R'))¶
-
CODE_NAMES= {'C': 'C++'}¶
-
usable_by¶ 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
usable_by_team¶ 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
language¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects¶
-
save(*args, **kwargs)[source]¶ Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
-
property
source_code¶
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.parentis aForwardManyToOneDescriptorinstance.
-
fork_of¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
get_language_display(*, field=<django.db.models.fields.CharField: language>)¶
-
get_next_by_creation_date(*, field=<django.db.models.fields.DateTimeField: creation_date>, is_next=True, **kwargs)¶
-
get_previous_by_creation_date(*, field=<django.db.models.fields.DateTimeField: creation_date>, is_next=False, **kwargs)¶
-
get_sharing_display(*, field=<django.db.models.fields.CharField: sharing>)¶
-
previous_version¶ 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.parentis aForwardManyToOneDescriptorinstance.
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-