Models — django-uploader 0.1 documentation

# Models

class `uploader.models.` `Upload`

  An uploaded file.

  `uploaded_file`

    `FileField` containing the uploaded file.

  `date_uploaded`

    `DateTimeField` auto populated with the date and time the file was uploaded.

  `admin_url`

    `CharField`(255) stores the admin url of the object the upload handler returns.

  `content_type`

    `ForeignKey`(`ContentType`) stores the content type of the object the upload handler returns.

  `object_id`

    `PositiveIntegerField` stores the id of the object the upload handler returns.

  `related_object`

    `GenericForeignKey` is a generic link to the object the upload handler returns.

  `thumbnail_attr`

    `CharField`(255) stores the attribute of the `related_object` from which it can get a thumbnail.

  `filename`

    Read Only Returns the filename of `uploaded_file`.

  `filename_slug`

    Read Only Returns the filename of `uploaded_file` after applying the `slugify` filter.

  `file_contents`

    Read Only Returns the contents of `uploaded_file` wrapped as a `SimpleUploadedFile` that is assignable directly to a `FileField` or `ImageField`.

  `mimetype`

    Read Only Returns the mimetype of `uploaded_file`.