X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3204e4303148302d278036eebcfc8cb105cc97d7..94e92455b60f276f2a1a5b55de5e6b060687f396:/src/toolbar/models.py?ds=sidebyside diff --git a/src/toolbar/models.py b/src/toolbar/models.py index fbaa396e..a221e04b 100644 --- a/src/toolbar/models.py +++ b/src/toolbar/models.py @@ -1,10 +1,8 @@ -# -*- coding: utf-8 -*- -# # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class ButtonGroup(models.Model): @@ -34,7 +32,7 @@ class Button(models.Model): # behaviour params = models.TextField(default='[]') # TODO: should be a JSON field - scriptlet = models.ForeignKey('Scriptlet', null=True, blank=True) + scriptlet = models.ForeignKey('Scriptlet', models.SET_NULL, null=True, blank=True) link = models.CharField(max_length=256, blank=True, default='') # ui related stuff