after much research [1] managed to do this [2] in the ListView class. Now I apply the DetailView.
[1] https://docs.djangoproject.com/en/dev/topics/conditional-view-processing/ [2] https://github.com/lucassimon/pywatch.com.br/blob/cache-techniques/screencasts/views.py#L75-L95 Em sexta-feira, 22 de agosto de 2014 20h29min47s UTC-3, André Luiz escreveu: > > I did it two days ago rewriting the render_to_response method. > > for reference > http://stackoverflow.com/questions/16286666/send-a-file-through-django-class-based-views/16287950#16287950 > > > 2014-08-22 18:55 GMT-03:00 Lucas Simon Rodrigues Magalhaes < > [email protected] <javascript:>>: > >> Hello, >> >> I see this tutorial [1] to control the response header and caching of >> pages in django. >> >> So I'm trying to enable this response header in a generic class >> DetailView. I did a search and found this code [2] at the end of the page >> and also the source code [3] of View. >> >> But are confused and do not know about which method to override >> correctly. Does anyone have any tips or example to send me? >> >> >> >> [1] >> http://blog.disqus.com/post/62187806135/scaling-django-to-8-billion-page-views >> >> [2] https://docs.djangoproject.com/en/dev/topics/class-based-views/ >> [3] >> https://github.com/django/django/blob/master/django/views/generic/base.py >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/0d948c6d-34bc-44da-9d1a-534cc373c16d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/0d948c6d-34bc-44da-9d1a-534cc373c16d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6611a99b-e491-4fc5-a661-94191f98c7ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

