Table Of Contents

This Page

Forms

forms.py

class files.forms.AttachmentForm(target_object, *args, **kwargs)

Modelform for uploading and/or editing attachments.

clean_attachment()

Make sure the attachment file size is allowed.

clean_honeypot()

Make sure the honeypot field is empty.

clean_security_hash()

Make sure the security hash match what’s expected.

clean_timestamp()

Make sure the timestamp is not too far (> 2 hours) in the past.

generate_security_data()

Generate initial security data for the form.

generate_security_hash(content_type, object_id, timestamp)

Generate a HMAC security hash from the provided info.

initial_security_hash(timestamp)

Get the initial security hash from self.content_object and a (unix) timestamp.

security_errors()

Return the errors associated with security.