""" I use this to place a direct link to a file on Dropbox into a Charfield, which is then queued up to be downloaded. You could also change the 'data-link-type' to 'preview' to link to the Dropbox preview page for the chosen file. file = CharField(widget=DropboxChooser()) You can read more about the Dropbox Chooser dropin here: https://www.dropbox.com/developers/dropins/chooser/ """ from django import forms class DropboxTextInput(DropboxInput, forms.TextInput): input_type = 'dropbox-chooser' class DropboxChooser(DropboxTextInput): def __init__(self, attrs=None): default_attrs = {'data-link-type': 'direct', 'style': 'visibility: hidden;'} if attrs: default_attrs.update(attrs) super(DropboxChooser, self).__init__(default_attrs) def render(self, name, value, attrs=None): html = super(DropboxChooser, self).render(name, value, attrs) final_attrs = self.build_attrs(attrs, name=name) html += """ """ return mark_safe(html)