python - AttributeError: 'module' object has no attribute '__all__' when running django-maintenancemode -


i running error when trying run middleware in django. https://github.com/shanx/django-maintenancemode

it returning

attributeerror: 'module' object has no attribute '__all__'. 

is there doing wrong? trying test out in localhost environment within virtualenv. have placed middleware settings file , error returned regardless of whether have mode set true or false. have placed 503.html template within templates folder want serve.

traceback

    traceback (most recent call last):   file "c:\python27\lib\wsgiref\handlers.py", line 85, in run     self.result = application(self.environ, self.start_response)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\contrib\staticfiles\handlers.py", line 72, in __call__     return self.application(environ, start_response)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\core\handlers\wsgi.py", line 236, in __call__     self.load_middleware()   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\core\handlers\base.py", line 51, in load_middleware     mod = import_module(mw_module)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\utils\importlib.py", line 35, in import_module     __import__(name)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django_maintenancemode-0.9.3-py2.7.egg\maintenancemode\middleware.py", line 6, in <module>     defaults.__all__.append('handler503') attributeerror: 'module' object has no attribute '__all__' [11/jul/2013 14:57:57] "get / http/1.1" 500 59 traceback (most recent call last):   file "c:\python27\lib\wsgiref\handlers.py", line 85, in run     self.result = application(self.environ, self.start_response)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\contrib\staticfiles\handlers.py", line 72, in __call__     return self.application(environ, start_response)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\core\handlers\wsgi.py", line 236, in __call__     self.load_middleware()   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\core\handlers\base.py", line 51, in load_middleware     mod = import_module(mw_module)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django\utils\importlib.py", line 35, in import_module     __import__(name)   file "c:\users\deep.c\.virtualenvs\dcwebdev\lib\site-packages\django_maintenancemode-0.9.3-py2.7.egg\maintenancemode\middleware.py", line 6, in <module>     defaults.__all__.append('handler503') attributeerror: 'module' object has no attribute '__all__' 

you're using version 0.9.3 old , unsupported , broken against recent releases of django. upgrade 0.10 , you'll works.

(the critical line modifies the correct object; django.conf.urls.default no longer has __all__ defined)


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -