Ticket #2809: models_update2.diff

File models_update2.diff, 793 bytes (added by Rockallite, 8 years ago)

[patch] Here's another scheme: use CharField type for storing referenced keys in string form. Is it possible for databases other than SQL Server?

  • django/contrib/admin/models.py

     
    1616    action_time = models.DateTimeField(_('action time'), auto_now=True)
    1717    user = models.ForeignKey(User)
    1818    content_type = models.ForeignKey(ContentType, blank=True, null=True)
    19     object_id = models.TextField(_('object id'), blank=True, null=True)
     19    object_id = models.CharField(_('object id'), maxlength=100, blank=True, null=True)
    2020    object_repr = models.CharField(_('object repr'), maxlength=200)
    2121    action_flag = models.PositiveSmallIntegerField(_('action flag'))
    2222    change_message = models.TextField(_('change message'), blank=True)
Back to Top