diff options
Diffstat (limited to 'django/contrib/auth/models.py')
-rw-r--r-- | django/contrib/auth/models.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index febadfc1be..070d7d4435 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -59,7 +59,11 @@ class Permission(models.Model): created for each Django model. """ name = models.CharField(_('name'), max_length=255) - content_type = models.ForeignKey(ContentType, verbose_name=_('content type')) + content_type = models.ForeignKey( + ContentType, + models.CASCADE, + verbose_name=_('content type'), + ) codename = models.CharField(_('codename'), max_length=100) objects = PermissionManager() |