Django Inline Image Solution

October 25th, 2008

I’ve been trying to find a solution for the Django admin that would allow me to upload images directly into a text field. With the default admin, images either have to be manually uploaded or be uploaded through an ImageField. ImageFields though, only produce a list of images. For instance, it would be difficult to spread a list of images throughout an article (as I have in this one).

By using the Filebrowser add-on in conjunction with TinyMCE (WYSIWYG) a solution is found! Follow the install directions at the Filebrowser code base and then it’s as easy as 1, 2, 3.

1. Click the insert image button in the TinyMCE textfield

2. Upload an image

3. Choose and insert the image

You can even assign CSS classes to images, adjust their size, and set rollover properties.

If you want the slick skin that’s shown above it’s available from the same developers under the name Grappelli and is well worth installing.

Post a comment

Sidearm