You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Organization(db.Model):
name = CharField()
def __unicode__(self):
return self.name
class Privilege(db.Model):
name = CharField()
def __unicode__(self):
return self.name
class PrivilegeAdmin(ModelAdmin):
columns = ('privilege_name')
class Role(db.Model):
organization = ForeignKeyField(Organization)
privilege = ForeignKeyField(Previlige)
class RoleAdmin(ModelAdmin):
foreign_key_lookups = {'privilege': 'name'}
I am finding it difficulty to create a individual privilege for individual role. Instead is there a way so that the foreign_key_lookups can have multiple selection or checkbox.
e.g. role = admin, reporter, article_writer
privilege = menu1, menu2, menu3, menu4, menu5
Present setting will allow me to select each privilege at a time, requiring 5 individual 'save'.
Is there a way out to override the code.
The text was updated successfully, but these errors were encountered:
I am finding it difficulty to create a individual privilege for individual role. Instead is there a way so that the foreign_key_lookups can have multiple selection or checkbox.
e.g. role = admin, reporter, article_writer
privilege = menu1, menu2, menu3, menu4, menu5
Present setting will allow me to select each privilege at a time, requiring 5 individual 'save'.
Is there a way out to override the code.
The text was updated successfully, but these errors were encountered: