← Back to team overview

graphite-dev team mailing list archive

Re: [Question #249413]: Graphite dashboard ViewDoesNotExist

 

Question #249413 on Graphite changed:
https://answers.launchpad.net/graphite/+question/249413

vaishali gave more information on the question:
Hi, I tried to import graphite.dashboard.views.dashboard and
graphite.graphlot.views.graphlot_render. And I found -my
/usr/lib/python2.6/site-packages/django/utils/functional.py file gives
-- AttributeError: 'Settings' object has no attribute 'LOG_DIR'

Here is console output :
---------------------------------------------
python manage.py shell
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import graphite.dashboard.views.dashboard
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/opt/graphite/webapp/graphite/dashboard/views.py", line 11, in <module>
    from graphite.util import json, getProfile
  File "/opt/graphite/webapp/graphite/util.py", line 18, in <module>
    from graphite.logger import log
  File "/opt/graphite/webapp/graphite/logger.py", line 75, in <module>
    log = GraphiteLogger() # import-shared logger instance
  File "/opt/graphite/webapp/graphite/logger.py", line 26, in __init__
    self.infoLogFile = os.path.join(settings.LOG_DIR,"info.log")
  File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'LOG_DIR'
>>> import graphite.graphlot.views.graphlot_render
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/opt/graphite/webapp/graphite/graphlot/views.py", line 7, in <module>
    from graphite.util import json
  File "/opt/graphite/webapp/graphite/util.py", line 18, in <module>
    from graphite.logger import log
  File "/opt/graphite/webapp/graphite/logger.py", line 75, in <module>
    log = GraphiteLogger() # import-shared logger instance
  File "/opt/graphite/webapp/graphite/logger.py", line 26, in __init__
    self.infoLogFile = os.path.join(settings.LOG_DIR,"info.log")
  File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'LOG_DIR'
---------------------------------------------

Both files - "/opt/graphite/webapp/graphite/dashboard/views.py and
/opt/graphite/webapp/graphite/graphlot/views.py uses file  >>
/opt/graphite/webapp/graphite/util.py and this util.py uses >>
/opt/graphite/webapp/graphite/logger.py and this logger.py uses
/usr/lib/python2.6/site-packages/django/utils/functional.py file.

I checked all this files, but fail to analyses problem here :(

Please provide your  hints...

You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.