I have just come up myself with an easy way to implement it:
Inheriting from a model class that includes these fields.
However I don't like it at all aesthetically.
Do I really have to do it like this?
On May 19, 3:26 pm, Marc wrote:
> Hi all,
> I would like to make my code more compact and DRY
Hi all,
I would like to make my code more compact and DRY, and for that
purpose I need to create a new field that includes two or more
existing models fields (eg. a CharField, a DateField).
Is there anything easier than inheriting from both classes and
following
http://docs.djangoproject.com/en/1.
2 matches
Mail list logo