On Sat, 2006-05-13 at 02:49 -0700, PythonistL wrote:
> Hello Luke,
> Thank you for your reply.Unfortunatelly I use Python 2.3 so, I can not
> use decorators as you described.

Decorators are just a convenient way of wrapping one function inside
another. You can still get all the functionality by just writing it
slightly differently. For reference, this Python 2.4 code

        @some_decorator
        def some_function(...):
            ...
        
is identical to this code (valid in Python 2.3, 2.4 and even earlier):

        def some_function(...):
                ...
                
        some_function = some_decorator(some_function)
        
See PEP 318 (http://www.python.org/dev/peps/pep-0318/ ) for all the
details if you care.

> 
> Is it possible to change HTTP headers ,in Django,in this way below?
> 
> response= HttpResponseRedirect("/ChangeProductList/")
> response['Pragma'] = "no cache"
> response['Cache-Control'] = "no-cache,must-revalidate"
> response['Pragma'] = "no cache"
> response['Expires'] = "Wed, 11 Jan 2006 05:00:00 GMT"
> return response

Yes, this you can alter HttpReponse objects (and their subclasses) like
this.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to