cri_cards.models module
- class cri_cards.models.Card(id, user, created_at, template, picture)[source]
Bases:
django.db.models.base.Model
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- created_at
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_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, 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.
- objects = <django.db.models.manager.Manager object>
- picture
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
- template
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.
- template_id
- 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
- class cri_cards.models.CardAttribute(id, slug, description, kind)[source]
Bases:
django.db.models.base.Model
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- KIND_CHOICES = (('text', 'Text value'), ('qrcode', 'QR Code'), ('picture', 'Picture URL'), ('mapped_text', 'text value from user data'), ('mapped_qrcode', 'QR Code from user data'), ('mapped_picture', 'Picture URL from user data'))
- MAPPED_PREFIX = 'mapped_'
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- cardattributevalue_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.
- cardtemplate_set
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_kind_display(*, field=<django.db.models.fields.CharField: kind>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- kind
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>
- slug
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class cri_cards.models.CardAttributeValue(id, attribute, value, priority, picture)[source]
Bases:
django.db.models.base.Model
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- attribute
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.
- attribute_id
- groups
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.
- id
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>
- picture
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)
- priority
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class cri_cards.models.CardBundle(id, zip_bundle)[source]
Bases:
django.db.models.base.Model
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- id
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>
- zip_bundle
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)
- class cri_cards.models.CardBundleTask(id, task_class, parameters, owner, task, status, created_at)[source]
Bases:
cri_tasks.models.CRITask
- exception DoesNotExist
- exception MultipleObjectsReturned
- class cri_cards.models.CardTask(id, task_class, parameters, owner, task, status, created_at)[source]
Bases:
cri_tasks.models.CRITask
- exception DoesNotExist
- exception MultipleObjectsReturned
- class cri_cards.models.CardTemplate(id, name, slug, template, priority)[source]
Bases:
django.db.models.base.Model
- exception DoesNotExist
Bases:
django.core.exceptions.ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
django.core.exceptions.MultipleObjectsReturned
- attributes
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.
- card_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.
- groups
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.
- id
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>
- priority
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- slug
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- template
The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:
>>> from myapp.models import MyModel >>> instance = MyModel.objects.get(pk=1) >>> instance.file.size
Assign a file object on assignment so you can do:
>>> with open('/path/to/hello.world') as f: ... instance.file = File(f)