Re: created_at / modified_at on all database tables

2015-09-16 Thread Shai Berger
Hi Aron, I think this feature does not belong in Django; hiding concrete parent fields sounds like a bad idea which is likely to open a whole can of worms and violated assumptions. Since the motivation for the unusual parent-and-child-fields comes from non- Django uses of the database, I suspec

Re: created_at / modified_at on all database tables

2015-09-16 Thread Aron Podrigal
The problem is with the field clashes. Consider the following from django.db import models class TimeStampedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True class Member(T

Re: created_at / modified_at on all database tables

2015-09-16 Thread Schmitt, Christian
I also think that this won't need to be in core since a Model Subclass works. We use this in our Application since we can't hard delete stuff so we overwritten the Model Field and the manager that all tables contain a date_deleted field which will be set when calling delete() objects.delete(). And

Re: created_at / modified_at on all database tables

2015-09-16 Thread Florian Apolloner
Settings.py is definitely not the way to go. As for Meta options: Feel free, just do it via your own Model subclass, there is no need for this to be in core imo. On Wednesday, September 16, 2015 at 7:44:17 AM UTC+2, Aron Podrigal wrote: > > Hi, > > I'd like to propose a created_at / modified_at

created_at / modified_at on all database tables

2015-09-15 Thread Aron Podrigal
Hi, I'd like to propose a created_at / modified_at auto field to models so that one can just turn this functionality on by a setting in settings.py or within the models Meta settings. I want these fields on both of the OneToOne related models when using concrete inheritance, thus using a TimeSt