alfortville: use new Django contenttypes.fields (#15007)
This commit is contained in:
parent
4ecbb2e988
commit
a6ec6eb908
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.contrib.contenttypes import generic
|
||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Inbox(models.Model):
|
|||
default=INFO)
|
||||
source_type = models.ForeignKey(ContentType, null=True)
|
||||
source_pk = models.PositiveIntegerField(null=True)
|
||||
source = generic.GenericForeignKey('source_type', 'source_pk')
|
||||
source = GenericForeignKey('source_type', 'source_pk')
|
||||
done = models.BooleanField(default=False)
|
||||
comments = models.TextField(blank=True, null=True, verbose_name=_('Comments'))
|
||||
last_update_timestamp = models.DateTimeField(auto_now=True, null=True)
|
||||
|
|
Loading…
Reference in New Issue