Permalink
Browse files

added media definition to include required javascript

  • Loading branch information...
1 parent e974ca9 commit ab2a4b74d11c29e9877769f07f51c2a9a95b31b3 @archen archen committed Mar 1, 2014
Showing with 8 additions and 0 deletions.
  1. +8 −0 tekextensions/widgets.py
View
@@ -17,6 +17,14 @@ def render(self, name, *args, **kwargs):
popupplus = render_to_string(self.template, {'field': name, 'model': self.model})
return html+popupplus
+ def _media(self):
+ js = ["admin/js/core.js", "admin/js/admin/RelatedObjectLookups.js"]
+
+ return forms.widgets.Media(
+ js=js
+ )
+ media = property(_media)
+
class FilteredMultipleSelectWithPopUp(PopUpBaseWidget, FilteredSelectMultiple):
pass

0 comments on commit ab2a4b7

Please sign in to comment.