Author: brosner
Date: 2008-07-09 13:09:38 -0500 (Wed, 09 Jul 2008)
New Revision: 7873

Modified:
   django/branches/newforms-admin/docs/admin.txt
Log:
newforms-admin: Added some documentation about media defintions in ModelAdmin 
classes. Fixed #7129.

Modified: django/branches/newforms-admin/docs/admin.txt
===================================================================
--- django/branches/newforms-admin/docs/admin.txt       2008-07-09 16:01:33 UTC 
(rev 7872)
+++ django/branches/newforms-admin/docs/admin.txt       2008-07-09 18:09:38 UTC 
(rev 7873)
@@ -481,6 +481,25 @@
     Performs a full-text match. This is like the default search method but uses
     an index. Currently this is only available for MySQL.
 
+``ModelAdmin`` media definitions
+--------------------------------
+
+There are times where you would like add a bit of CSS and/or Javascript to
+the add/change views. This can be accomplished by using a Media inner class
+on your ``ModelAdmin``::
+
+    class ArticleAdmin(admin.ModelAdmin):
+        class Media:
+            css = {
+                "all": ("my_styles.css",)
+            }
+            js = ("my_code.js",)
+
+Keep in mind that this will be prepended with ``MEDIA_URL``. The same rules
+apply as `regular media definitions on forms`_.
+
+.. _regular media definitions on forms: ../newforms/#media
+
 ``InlineModelAdmin`` objects
 ============================
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to