* https://docs.djangoproject.com/en/1.7/topics/http/sessions/#setting-
test-cookies
* https://docs.djangoproject.com/en/1.7/topics/http/sessions/#examples
* https://docs.djangoproject.com/en/1.7/topics/auth/default/#the-login-
required-decorator
* https://docs.djangoproject.com/en/1.7/topics/cache/#the-per-view-cache
* https://docs.djangoproject.com/en/1.7/topics/cache/#using-vary-headers
* https://docs.djangoproject.com/en/1.7/topics/cache/#controlling-cache-
using-other-headers
* https://docs.djangoproject.com/en/1.7/topics/pagination/#using-
paginator-in-a-view
* https://docs.djangoproject.com/en/1.7/topics/conditional-view-processing
/#the-condition-decorator
--
Ticket URL: <https://code.djangoproject.com/ticket/24458>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* owner: nobody => danielquinn
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:1>
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
Hopefully we can do this in a way that doesn't require two examples for
every case. Maybe a more general "translating between function and class-
based views" overview would be useful.
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:2>
Comment (by danielquinn):
I agree, this would be preferable. Should it just be an addendum to the
existing "Class Based Views" page, or something separate?
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:3>
Comment (by danielquinn):
Actually, now that I look at the CBV docs, there appears to be everything
covered there, it just wasn't immediately obvious from the URLs above
where I needed to look to do things like use `@login_required` in a CBV.
Maybe it's just a question of prioritising function-based over class-
based, and that's fine if that's the case, but some way to point to these
docs when referencing things like decorators would be handy.
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:4>
Comment (by timgraham):
Yea, not sure. It seems a bit annoying to link to that doc on every
decorator, but maybe it could be done tastefully.
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:5>
* status: assigned => closed
* resolution: => worksforme
Comment:
Feel free to reopen if you want to provide a patch. Not sure it's terribly
high priority.
--
Ticket URL: <https://code.djangoproject.com/ticket/24458#comment:6>