Proposal:
Add request to Feed class so it's accessible via self.request (as CBV)
--
Ticket URL: <https://code.djangoproject.com/ticket/25741>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* type: Uncategorized => Cleanup/optimization
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:1>
* owner: nobody => alexmorozov
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:2>
* stage: Unreviewed => Accepted
Comment:
Looks like an okay idea at first glance.
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:3>
Comment (by alexmorozov):
I believe this will require functionality similar to `View.as_view()` to
be thread-safe. Or even sublassing the `Feed` from the generic `View`. But
this apparently will break backwards compatibility.
@timgraham, what do you think about it? Is it worth bothering?
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:4>
Comment (by RamezIssac):
Either add it to the Feed class in `Feed.__call__()` , or later on in
`Feed.get_feed()`
If that is not convenient for some reason (@alexmorozov care to elaborate
on thread safe part, How this wont be thread safe?! I'm not an expert in
this area)
The next best thing is to send it as a parameter but this road is long,
bumpy and not backward compatible.
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:5>
Comment (by RamezIssac):
Replying to [comment:4 alexmorozov]:
> I believe this will require functionality similar to `View.as_view()` to
be thread-safe. Or even sublassing the `Feed` from the generic `View`. But
this apparently will break backwards compatibility.
>
Can we implement `as_view()` code in the `__call__()` behind the scenes
and escape backward-incompatibility ?!
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:6>
Comment (by alexmorozov):
@RamezIssac: I surely can implement it either as a `as_view()` addition or
a `__call__()` override. The problem is, AFAIK, Django is very
conservative when it comes to breaking compatibility (it seems to me, the
`__call()__` override will break it too).
So I'd like to get an approvement from core devs before I start, so that
my work won't be ultimately dumped.
I you ask me, I believe we should subclass the `generic.View`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:7>
* easy: 1 => 0
Comment:
Clearing the 'Easy pickings' flag, as it is obviously not the case.
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:8>
* owner: Alex Morozov => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/25741#comment:9>