django - AttributeError: 'Settings' object has no attribute 'ADMIN_MEDIA_PREFIX' -
i trying make smart menu using chainedforeignkey, far stuck import of chainedforeignkey
:
from smart_selects.db_fields import chainedforeignkey
i using pydev on eclipse. downloaded smart select package here: http://pydoc.net/python/django-smart-selects/1.0.2/ , added pythonpath
when debug get:
traceback (most recent call last): file "c:\users\mr.machine\desktop\eclipse\plugins\org.python.pydev_2.7.0.2013032300\pysrc\pydevd.py", line 1397, in <module> debugger.run(setup['file'], none, none) file "c:\users\mr.machine\desktop\eclipse\plugins\org.python.pydev_2.7.0.2013032300\pysrc\pydevd.py", line 1090, in run pydev_imports.execfile(file, globals, locals) #execute script file "c:\users\mr.machine\desktop\workspace\medbook\testapp\forms.py", line 4, in <module> smart_selects.db_fields import chainedforeignkey file "c:\users\mr.machine\desktop\django-smart-selects-1.0.2\smart_selects\db_fields.py", line 2, in <module> import form_fields file "c:\users\mr.machine\desktop\django-smart-selects-1.0.2\smart_selects\form_fields.py", line 1, in <module> smart_selects.widgets import chainedselect file "c:\users\mr.machine\desktop\django-smart-selects-1.0.2\smart_selects\widgets.py", line 20, in <module> class chainedselect(select): file "c:\users\mr.machine\desktop\django-smart-selects-1.0.2\smart_selects\widgets.py", line 30, in chainedselect class media: file "c:\users\mr.machine\desktop\django-smart-selects-1.0.2\smart_selects\widgets.py", line 33, in media ('js/jquery.min.js', 'js/jquery.init.js')] file "c:\python27\lib\site-packages\django\conf\__init__.py", line 54, in __getattr__ return getattr(self._wrapped, name) attributeerror: 'settings' object has no attribute 'admin_media_prefix'
any appreciated
marking comment answer future reference:
looks admin_media_prefix
not set.
setting admin_media_prefix='/static/'
or other appropriate value admin media fix issue
Comments
Post a Comment