Re: Proposal: A diagram showing Class Based View inheritance and mixins.

2013-08-21 Thread Meshy
tp://ccbv.co.uk/TodayArchiveView/) and click the "Hierarchy diagram" link towards the top right. This feature is still a work in progress, and hopefully will show attributes/methods soon (and be better integrated into the page). For the moment, I hope this keeps everyone happy! Meshy `:D

Re: Class based views: A standard hook for http-method-independent code (and a proposal for an init() method)

2012-10-31 Thread Meshy
Marc and I have been using a mixin to override `dispatch()` with this functionality. He has an ongoing pull request on django-braces<https://github.com/brack3t/django-braces/pull/8>with the code. I hope this can be useful to some of you. Meshy. On Wednesday, October 31, 2012 9:49:26

Proposal: unique by default on SlugFields

2012-06-27 Thread Meshy
Perhaps it's just me, but I've very rarely wanted a SlugField that wasn't unique. Would this not be a sensible default? I realise that a lot of apps will rely upon this default, but objectively speaking would this not be better? Perhaps this change would be appropriate for django 2.0. At the mo

Re: Django's CVB - Roadmap?

2012-06-04 Thread Meshy
Still sounds like an issue with the docs to me, and while they do still have some issues, I'm a big supporter of the CBVs. I've posted this here before, but http://ccbv.co.uk/ really helps cut out most of the pain of the "looking through the source code" stage of understanding the CBVs because

Re: Awkwardness of overriding View.dispatch for method-agnostic request-handling

2012-04-11 Thread Meshy
I agree that there is a need for this -- it has come up several times for me now -- however, I prefer my proposal (pretty printed here: https://gist.github.com/1957251 , code below...) mentioned in the topic "Class based views: A standard hook for http-method-independent code" (https://groups.g

Re: Class based views: A standard hook for http-method-independent code

2012-03-04 Thread Charlie &quot;meshy" Denton
Firstly, please excuse my double post: I didn't realise posts are vetted, so I thought it had been lost. The very significant advantage of this being a hook (instead of overriding dispatch) is that it allows you to call methods that require dispatch to have already set variables (eg: self.kwarg

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Charlie &quot;meshy" Denton
the dispatch handler is called. 3. You can save extra variables to self as required I expect 2 is probably the most common use case. Meshy. On Thursday, March 1, 2012 6:38:08 PM UTC, Marc Tamlyn wrote: > > Hi all, > > Apologies if this has been raised before. I've had a look

Re: Class based views: A standard hook for http-method-independent code

2012-03-02 Thread Charlie &quot;meshy" Denton
I'd like to see something like this too: my suggestion is here: https://gist.github.com/1957251 This implementation also allows you to play with the request, args and kwargs before they are saved on the model. On Mar 1, 6:38 pm, Marc Tamlyn wrote: > Hi all, > > Apologies if this has been raised