Results tagged “django” from SweetFriday

A long time ago, I wrote a blog post and some code that validates file uploads in Django. In the last week, it seems a lot of people have been interested in the post and since Django finally has a stable 1.0 release, I thought I would update the previous blog post.

UPDATE: This post has been updated so the code will work with Django 1.0

While working on Clapton, the Django-based Content Management System (CMS), I had to write validation code for file uploads. This is needed because Clapton contains applications specific to media types such as documents which requires Word Documents, PDFs or OpenDocumentFormat files, and podcasts which requires MP3 or OGG files. But how do you guarantee that the right files are uploaded? By using Django's custom fields and newforms module.

Find recent content on the main index or look in the archives to find all content.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by Movable Type 4.1