Models — MassMedia v0.3beta1 documentation

MassMedia v0.3beta1 documentation

# Models

- Table of Contents
- index
  modules
  previous

# Models

class `massmedia.models.` `Media`(*args, **kwargs)

  The abstract base class for all media types. It includes all the common attributes and functions.

  `title`
    A headline or short descriptive sentence. Used in creating the slug field. CharField * `max_length` - 255
  `slug`

    SlugField A variation of the title attribute that can be used in URLs. They must be unique.

    `unique=True`

  `title`

    CharField A headline or short descriptive sentence. Used in creating the slug field.

    `max_length=255`

  class `Meta`
  `Media.` `author`
  `Media.` `author_name`
  `Media.` `get_absolute_url`(*args, **kwargs)
  `Media.` `get_mime_type`()
  `Media.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Media.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Media.` `get_template`(template_type)
  `Media.` `media_url`
  `Media.` `parse_metadata`()
  `Media.` `render_detail`()
  `Media.` `render_thumb`()
  `Media.` `save`(*args, **kwargs)
  `Media.` `sites`
  `Media.` `thumb`()

class `massmedia.models.` `PublicMediaManager`
  `public`()

class `massmedia.models.` `Image`(*args, **kwargs)

  Image(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file, original_id)

  exception `DoesNotExist`
  exception `Image.` `MultipleObjectsReturned`
  `Image.` `author`
    `author.` `field`
      `author.field.` `default`
        alias of `NOT_PROVIDED`
      static `author.field.` `related_query_name`(*moreargs, **morekwargs)
  `Image.` `original`
    `original.` `field`
      `original.field.` `default`
        alias of `NOT_PROVIDED`
      static `original.field.` `related_query_name`(*moreargs, **morekwargs)
  `Image.` `author`
  `Image.` `get_absolute_url`(*moreargs, **morekwargs)
  `Image.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Image.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Image.` `media_url`
  `Image.` `original`
  `Image.` `parse_metadata`()
  `Image.` `sites`
  `Image.` `variations`
  `Image.` `video_set`

class `massmedia.models.` `Video`(*args, **kwargs)

  Video(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file, thumbnail_id)

  exception `DoesNotExist`
  exception `Video.` `MultipleObjectsReturned`
  `Video.` `author`
  `Video.` `get_absolute_url`(*moreargs, **morekwargs)
  `Video.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Video.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Video.` `grabvideo`
  `Video.` `media_url`
  `Video.` `parse_metadata`()
  `Video.` `sites`
  `Video.` `thumb`()
  `Video.` `thumbnail`

class `massmedia.models.` `GrabVideo`(*args, **kwargs)

  GrabVideo(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file, thumbnail_id, video_ptr_id, asset_id, layout_id, keywords)

  exception `DoesNotExist`
  exception `GrabVideo.` `MultipleObjectsReturned`
  `GrabVideo.` `get_absolute_url`(*moreargs, **morekwargs)
  `GrabVideo.` `save`(*a, **kw)
  `GrabVideo.` `video_ptr`

class `massmedia.models.` `Audio`(*args, **kwargs)

  Audio(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file)

  exception `DoesNotExist`
  exception `Audio.` `MultipleObjectsReturned`
  `Audio.` `author`
  `Audio.` `get_absolute_url`(*moreargs, **morekwargs)
  `Audio.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Audio.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Audio.` `media_url`
  `Audio.` `sites`

class `massmedia.models.` `Flash`(*args, **kwargs)

  Flash(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file)

  exception `DoesNotExist`
  exception `Flash.` `MultipleObjectsReturned`
  `Flash.` `author`
  `Flash.` `get_absolute_url`(*moreargs, **morekwargs)
  `Flash.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Flash.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Flash.` `media_url`
  `Flash.` `sites`

class `massmedia.models.` `Document`(*args, **kwargs)

  Document(id, title, slug, creation_date, author_id, one_off_author, caption, metadata, categories, reproduction_allowed, public, external_url, mime_type, width, height, widget_template, file)

  exception `DoesNotExist`
  exception `Document.` `MultipleObjectsReturned`
  `Document.` `author`
  `Document.` `get_absolute_url`(*moreargs, **morekwargs)
  `Document.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Document.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Document.` `media_url`
  `Document.` `sites`

class `massmedia.models.` `Collection`(*args, **kwargs)

  Collection(id, creation_date, title, slug, caption, zip_file, public, categories)

  exception `DoesNotExist`
  exception `Collection.` `MultipleObjectsReturned`
  `Collection.` `collectionrelation_set`
  `Collection.` `get_next_by_creation_date`(*moreargs, **morekwargs)
  `Collection.` `get_previous_by_creation_date`(*moreargs, **morekwargs)
  `Collection.` `process_zipfile`()
  `Collection.` `save`(*args, **kwargs)
  `Collection.` `sites`

class `massmedia.models.` `CollectionRelation`(*args, **kwargs)

  CollectionRelation(id, collection_id, content_type_id, object_id)

  exception `DoesNotExist`
  exception `CollectionRelation.` `MultipleObjectsReturned`
  `CollectionRelation.` `collection`
  `CollectionRelation.` `content_object`
    Provides a generic relation to any object through content-type/object-id fields.
  `CollectionRelation.` `content_type`

class `massmedia.models.` `MediaTemplate`(*args, **kwargs)

  MediaTemplate(id, name, mimetype, content)

  exception `DoesNotExist`
  exception `MediaTemplate.` `MultipleObjectsReturned`
  `MediaTemplate.` `get_name_display`(*moreargs, **morekwargs)
  `MediaTemplate.` `template`()