Florian, thank you for your answer.
I'm totally fine with Request.META['prefer'], it seems to be a 
straightforward solution. However, checking this dictionary in each view 
that supports this feature and also adding "Vary: Prefer" to response 
headers seems to be a little odd and inconvinient. I thought maybe there 
might be some better solution.


среда, 23 июля 2014 г., 16:34:32 UTC+4 пользователь Florian Apolloner 
написал:
>
> Hi,
>
> On Wednesday, July 23, 2014 1:58:26 PM UTC+2, S4mmael wrote:
>>
>> It would be really nice to have some mechanism intended to work with this 
>> header in Django. A kind of miidleware or a decorator maybe.
>>
>
> What's wrong with "if request.META.get('prefer') == 'safe'"?
>
> Cheers,
> Florian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0ff9ab17-62bf-40e6-9a21-e8191323aa00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to