in your model use something like this: image = models.CharField('Image', help_text='FileBrowser: /images/ 2006/blog/', maxlength=200, blank=True, null=True)
the script you mentioned searches for the help_text "FileBrowser" and the given directory (the directory is optional, of course). then, the script adds the icon for the filebrowser and the html for previews. patrick Am 28.08.2006 um 20:11 schrieb [EMAIL PROTECTED]: > > You note >> With adding the script AddFileBrowser.js to your model, you are >> getting a link to the FileBrowser >> as well as an Image-Preview. > > How can I use it in my model to have previews for image field ? > > I see > > init: function() { > var helptext = document.getElementsByTagName('p'); > for (var i = 0, ht; ht = helptext[i]; i++) { > charFieldID = > ht.previousSibling.previousSibling.getAttribute('id'); > > > That means you get all <p> and misteriously search for sibling's id ? > What's mistery is that ? > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---