genui.projects package

Subpackages

Submodules

genui.projects.admin module

class genui.projects.admin.GenUIProjectAdmin(model, admin_site)[source]

Bases: ModelAdmin

property media
readonly_fields = ['created', 'updated']

genui.projects.apps module

class genui.projects.apps.ProjectsConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'genui.projects'
ready(force=False)[source]

Override this method in subclasses to run code when Django starts.

genui.projects.genuisetup module

genuisetup

Created by: Martin Sicho On: 4/28/20, 4:30 PM

genui.projects.genuisetup.setup(*args, **kwargs)[source]

genui.projects.models module

class genui.projects.models.BaseDataSet(*args, **kwargs)[source]

Bases: PolymorphicAbstractModel

class Meta[source]

Bases: object

abstract = False
created

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

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_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
name

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

polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_super_sub_accessors_replaced = False
project

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.

project_id
abstract update()[source]
updated

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

class genui.projects.models.BaseProject(*args, **kwargs)[source]

Bases: PolymorphicAbstractModel

class Meta[source]

Bases: object

abstract = False
created

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

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_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
name

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

owner

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.

owner_id
polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_super_sub_accessors_replaced = False
abstract update()[source]
updated

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

class genui.projects.models.DataSet(*args, **kwargs)[source]

Bases: BaseDataSet

class Meta[source]

Bases: object

abstract = False
created

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

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_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
name

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

polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_super_sub_accessors_replaced = False
project

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.

project_id
save(*args, **kwargs)[source]

Calls pre_save_polymorphic() and saves the model.

update()[source]
updated

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

class genui.projects.models.PolymorphicAbstractModel(*args, **kwargs)[source]

Bases: PolymorphicModel

class Meta[source]

Bases: object

abstract = False
polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_super_sub_accessors_replaced = False
class genui.projects.models.PolymorphicAbstractModelMeta(name, bases, namespace, **kwargs)[source]

Bases: ABCMeta, PolymorphicModelBase

class genui.projects.models.Project(id, polymorphic_ctype, name, description, created, updated, owner)[source]

Bases: BaseProject

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

activityset_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 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.

created

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

description

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

drugexenvironment_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 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.

drugexscorer_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 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.

generator_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 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.

get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, 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.

model_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 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.

molset_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 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.

name

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

owner

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.

owner_id
polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False
save(*args, **kwargs)[source]

Calls pre_save_polymorphic() and saves the model.

scoremodifier_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 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.

scoringmethod_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 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.

update()[source]
updated

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

genui.projects.serializers module

serializers

Created by: Martin Sicho On: 05-12-19, 12:25

class genui.projects.serializers.FilterToProjectMixIn[source]

Bases: object

get_queryset()[source]
class genui.projects.serializers.ProjectSerializer(*args, **kwargs)[source]

Bases: HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'created', 'updated', 'owner')
model

alias of Project

read_only_fields = ('created', 'updated', 'owner')
create(validated_data)[source]

We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:

return ExampleModel.objects.create(**validated_data)

If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:

example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance

The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.

genui.projects.signals module

signals

Created by: Martin Sicho On: 3/30/20, 12:16 PM

genui.projects.signals.add_user_to_users_group(sender, instance, created, **kwargs)[source]

genui.projects.tasks module

tasks

Created by: Martin Sicho On: 05.09.22, 11:54

genui.projects.tests module

class genui.projects.tests.ProjectMixIn[source]

Bases: UserMixIn

createProject()[source]
setUp() None[source]
class genui.projects.tests.ProjectTestCase(methodName='runTest')[source]

Bases: ProjectMixIn, APITestCase

test_default_generator()[source]
class genui.projects.tests.UserMixIn[source]

Bases: object

createUser()[source]
deleteUser()[source]
login()[source]
setUp()[source]
tearDown()[source]

genui.projects.urls module

urls.py

Created by: Martin Sicho On: 04-12-19, 15:06

genui.projects.views module

class genui.projects.views.GenUIProjectViewSet(**kwargs)[source]

Bases: FilterToUserMixIn, ModelViewSet

basename = None
description = None
detail = None
name = None
queryset
serializer_class

alias of ProjectSerializer

suffix = None
genui.projects.views.index(req)[source]

Module contents