Hugo, check this out:- http://groups.google.com/group/django-users/msg/581a32c198e6ae07
Not sure cache decorators have arguments... Cheers, Tone On Nov 4, 11:13 pm, "Hugh Bien" <[EMAIL PROTECTED]> wrote: > Hi, > I've emailed a few questions to this mailing list already and I've gotten > great responses, so thanks everyone for helping out people who are new to > Django. > > Okay, on to my question. I'm trying to get caching working with my weblog > but I keep running into an AttributeError. All I am doing is importing the > 'cache_page' function and decorating my view: > > @cache_page(60 * 15) > def my_view: > # do stuff and return render_to_response ... > > I get this error when I go to any view: > > Exception Type:AttributeErrorException Value:'function' object has no > attribute 'method'Exception > Location:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/si > te-packages/django/middleware/cache.py > in process_request, line 47 > > which occurs at this line in cache.py: > > if not request.method in ('GET', 'HEAD') or request.GET: > > I really have no idea what went wrong, has anyone else run into this error? > > Thanks, > - Hugh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---