django-contentrelations 0.3.1 documentation

Model Reference

Slide

class Slide
object_id

IntegerField

Part of the generic relation for the resource this slide is augmenting.

content_type

ForeignKey (django.contrib.contenttypes.models.ContentType)

Part of the generic relation for the resource this slide is augmenting.

content_object

GenericForeginKey

Part of the generic relation for the resource this slide is augmenting.

resource_type

CharField (50)

An override of the content_object‘s resource type. Choices are displayed if specified in RESOURCE_TYPE_CHOICES. It will use the content_object‘s mapped resource type if blank.

title

CharField (100)

An override of the title of the content_object. It will use the content_object‘s mapped title if blank.

description

TextField

An override of the description of the content_object. It will use the content_object‘s mapped description if blank.

key_image_custom

FileField

An override of the key image of the content_object. It will use the content_object‘s mapped key image if blank.

key_image_width

Read only IntegerField

Automatically set to the width of key_image_custom image when uploaded.

key_image_height

Read only IntegerField

Automatically set to the height of key_image_custom image when uploaded.

ForeignKey ( KEY_IMAGE_MODEL )

An override of the key image of the content_object using a related model as defined in KEY_IMAGE_MODEL. It will use the content_object‘s mapped key image if blank.

credit

CharField (255)

An override of the credit of the content_object. It will use the content_object‘s mapped credit if blank.

url

CharField (255)

An override of the URL of the content_object. It will use the content_object‘s mapped URL if blank.

citation

CharField (255)

An override of the citation of the content_object. It will use the content_object‘s mapped citation if blank.

notes

TextField

An override of the notes of the content_object. It will use the content_object‘s mapped notes if blank.

internal_ref

CharField (255)

An override of the internal_ref of the content_object. It will use the content_object‘s mapped internal_ref if blank.

RelatedResource

class RelatedResource
source_id

IntegerField

The id of the source object. Part of a generic relation to the source object.

source_type

ForeignKey (django.contrib.contenttypes.models.ContentType)

The ContentType of the source object. Part of the generic relation to the source object.

source_object

GenericForeignKey

The source object as defined by the source_id and source_type.

object_id

IntegerField

The id of the related object. Part of a generic relation to the related object.

object_type

ForeignKey (django.contrib.contenttypes.models.ContentType)

The ContentType of the related object. Part of the generic relation to the related object.

object

GenericForeignKey

The related object as defined by the object_id and object_type.

relation_source

IntegerField

Currently unused, but hopefully will be used to allow multiple types of resource relationships in a future version.

relation_type

CharField (255)

This is a free-form field for specifying how the related object is linked to the source object.

order

IntegerField

Allows for establishing an order to the related objects.