TNX
On Friday, November 4, 2016 at 5:56:56 PM UTC+2, Artem Bernatskyy wrote:
>
> Hello.
>
> Suppose i have a code (http://pastebin.com/6rUqKD8q)
>
> And in CBV there are a bunch of methods with EXACTLY the same code.
>
> My question is - can i somehow inherit them from ONE place, in order to be
>
Just create another CBV that factors out all of the similarities between all of
the other CBVs. Then inherit from your new CBV to create your more specific
ones. Basically instead of inheriting from the Django CBVs, you will inherit
from your own.
From: django-users@googlegroups.com [mailto:d
2 matches
Mail list logo