Opened 15 years ago

Closed 14 years ago

#13650 closed (invalid)

Permissions of abstract model without fields not added on syncdb

Reported by: Dirk Eschler Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: eschler@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've got an abstract model which has no fields and only defines permissions. The permission isn't added to the auth_permission table on syncdb nor is the content_type added to django_content_type. The app is in INSTALLED_APPS.

class Base(models.Model):

class Meta:

abstract = True
permissions = (

("can_do_foo", _(u"Can do foo")),

)

Is this a bug or am i missing something? I'm using django-1.2.1.

Change History (3)

comment:1 by Dirk Eschler, 15 years ago

class Base(models.Model):
    class Meta:
        abstract = True
        permissions = (
            ("can_do_foo", _(u"Can do foo")),
        )

comment:2 by anonymous, 14 years ago

Cc: eschler@… added

comment:3 by Russell Keith-Magee, 14 years ago

Resolution: invalid
Status: newclosed

Yes - you are missing something. The model is abstract. That means it doesn't exist. As soon as you define a concrete subclass, the permissions, content type etc will be created for that concrete subclass; depending on how you have subclassed the concrete class, the permissions etc will be inherited.

Note: See TracTickets for help on using tickets.
Back to Top