I prefer django-rest-framework's flow through dispatch(). You can override
self.initial() to safely execute method-agnostic logic, but unlike your
example, it doesn't have to return a response object. The response object
is returned by the appropriate self.() as usual.
https://github.com/tomchr
On Wednesday, November 7, 2012 1:48:09 AM UTC-8, Marc Tamlyn wrote:
>
> It seems there had been a little confusion as to exactly what the initial
> proposal was. I had assumed it was just about removing the `depth` argument
> but it was still possible to pass *no* arguments to get the implicit
I wanted to post and modified version of a gist posted earlier in this
thread.
https://gist.github.com/4032482
I originally implemented the original structure of having an `init` hook
which was called between setting request, args, and kwargs, but i quickly
found that I had a few situations wh
+1 for the mixin approach. I needed to copy 90% of the AbstractUser model
just to make the email field unique and remove the username field. The
permission requirements I usually have are compatible with the one's used
by the admin, but the username field is superfluous. As soon as your
permission
It seems there had been a little confusion as to exactly what the initial
proposal was. I had assumed it was just about removing the `depth` argument
but it was still possible to pass *no* arguments to get the implicit
"follow everything" behaviour. In fact Luke was suggesting that we remove
th
On Wed, Nov 7, 2012 at 12:06 AM, Russell Keith-Magee
wrote:
> Hi Eric,
>
> Although the full stack trace would confirm it, I think I can guess what the
> problem is here -- it's the mechanism for generating reset tokens.
>
> If you dig into the token generation (and reversal) mechanisms, they use
Hi Alex,
On Tuesday, November 6, 2012 11:55:39 PM UTC+1, Alex Ogier wrote:
>
> So, I went ahead and implemented the most useful mixin of the three that I
> defined previously, the PermissionsMixin.
>
I am not really sold on the idea of having this PermissionMixin, for one
reason: If I need a cu