Skip to content

Instantly share code, notes, and snippets.

@tomgruner
tomgruner / admin.py
Created January 11, 2012 16:39 — forked from uhop/admin.py
Adding Dojo's rich editor with minimal plugins to Django's Admin that shows the editor on click and hides on blur
# Example how to add rich editor capabilities to your models in admin.
from django.contrib.admin import site, ModelAdmin
import models
# we define our resources to add to admin pages
class CommonMedia:
js = (
'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js',