git.ithinksw.org
/
philo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d6479a6
)
Switched node_view conditions for raising MIDDLEWARE_NOT_CONFIGURED to actually check...
author
Stephen Burrows
<stephen.r.burrows@gmail.com>
Tue, 16 Nov 2010 16:49:09 +0000
(11:49 -0500)
committer
Stephen Burrows
<stephen.r.burrows@gmail.com>
Tue, 16 Nov 2010 16:49:09 +0000
(11:49 -0500)
views.py
patch
|
blob
|
history
diff --git
a/views.py
b/views.py
index
41718e5
..
255e54e
100644
(file)
--- a/
views.py
+++ b/
views.py
@@
-1,3
+1,4
@@
+from django.conf import settings
from django.http import Http404
from django.views.decorators.vary import vary_on_headers
from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED
from django.http import Http404
from django.views.decorators.vary import vary_on_headers
from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED
@@
-5,7
+6,7
@@
from philo.exceptions import MIDDLEWARE_NOT_CONFIGURED
@vary_on_headers('Accept')
def node_view(request, path=None, **kwargs):
@vary_on_headers('Accept')
def node_view(request, path=None, **kwargs):
- if
not hasattr(request, 'node')
:
+ if
"philo.middleware.RequestNodeMiddleware" not in settings.MIDDLEWARE_CLASSES
:
raise MIDDLEWARE_NOT_CONFIGURED
if not request.node:
raise MIDDLEWARE_NOT_CONFIGURED
if not request.node: