Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Provides a archetypes field validator for content types of files

Project Description

Introduction

Provides an archetypes validator for file and image fields to only allow specific content types to be added.

Example

from Products.ContentTypeValidator.validator import ContentTypeValidator

  ...

FileField('file',
    validators = (ContentTypeValidator(('audio/mpeg', 'audio/x-mp3', 'audio/x-mpeg', 'audio/mp3',))),
    widget = atapi.FileWidget(
        description = '',
        label=_(u'label_audio', default=u'Audio file'),
        show_content_type = False,),
),

  ...

History

2.0b4 (2012-11-20)

  • Added unittests [gbastien]
  • Updated translations [gbastien]

2.0b3 (2010-10-24)

  • Updated German and Français translation [macagua]
  • Added Spanish translation [macagua]
  • Added master template .pot file [macagua]
  • Set zip_safe flag to False

2.0b2 - (2010-10-21)

  • Removed unused generic setup profile
  • Added README

2.0b1 - (2010-10-20)

  • First public release

1.2 - (Unreleased)

  • Fixed mimetype parsing in validator

1.1 - (Unreleased)

  • Changes added / profiles added / version increase

1.0 - (Unreleased)

  • Init Rls for plone3
Release History

Release History

This version
History Node

2.0b4

History Node

2.0b3

History Node

2.0b2

History Node

2.0b1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Products.ContentTypeValidator-2.0b4.zip (21.4 kB) Copy SHA256 Checksum SHA256 Source Nov 21, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting