Skip to main content

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

Project details


Download files

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

Source Distribution

Products.ContentTypeValidator-2.0b4.zip (21.4 kB view details)

Uploaded Source

File details

Details for the file Products.ContentTypeValidator-2.0b4.zip.

File metadata

File hashes

Hashes for Products.ContentTypeValidator-2.0b4.zip
Algorithm Hash digest
SHA256 39712ee499b8c8b859a28457c925c73dc5b0b71d2c259618741985535066f37c
MD5 60941c4ac77ba0f88383b50b339c1eb9
BLAKE2b-256 7873d532b7a54edfe02eb56d2cb312ba3405268df75ab616b01252d2c2801ab9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page