#2567: Cache does not work for some indeterminate setup
--------------------------------------------------------+-------------------
 Reporter:  Jaroslaw Zabiello <[EMAIL PROTECTED]>  |        Owner:  jacob
     Type:  defect                                      |       Status:  new  
 Priority:  normal                                      |    Milestone:       
Component:  Cache system                                |      Version:  SVN  
 Severity:  normal                                      |   Resolution:       
 Keywords:  cache win32                                 |  
--------------------------------------------------------+-------------------
Comment (by [EMAIL PROTECTED]):

 OK, I made another app with a simple view to rule out any issues there...
 the simplified view is:
 
 {{{
 from django.views.decorators.cache import cache_page
 from django.http import HttpResponse
 import sys
 
 @cache_page(60*60*24)
 def cacheindex(request):
   return HttpResponse(sys.version,'text/plain')
 }}}
 
 and the result I am getting is:
 
 {{{
 Traceback (most recent call last):
 File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py" in
 get_response
   65. callback, callback_args, callback_kwargs = resolver.resolve(path)
 File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py" in
 resolve
   158. sub_match = pattern.resolve(new_path)
 File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py" in
 resolve
   114. return self.callback, args, kwargs
 File "/usr/lib/python2.4/site-packages/django/core/urlresolvers.py" in
 _get_callback
   125. raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" %
 (func_name, mod_name, str(e))
 
   ViewDoesNotExist at /mysite/test/cache/
   Tried cacheindex in module mysite.test.views. Error was: 'function'
 object has no attribute 'method'
 }}}
 
 but if I comment out the @cache_page line it runs fine...
 
 {{{
 2.4.3 (#2, Apr 27 2006, 14:43:58)
 [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)]
 }}}
 
 FYI - Relatively new to Python and Django, so it could certainly be me, I
 just posted because it seemed like another case of the original problem,
 which it now looks like it might not be...

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2567>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to