I want to have some permissions on few contents, which are NOT models
, but are 'name' in the following table:
mysql> select * from my_contents;
+----+---------------------+
| id | name |
+----+---------------------+
| 1 | content1 |
| 2 | content2 |
I understand that Django's Permission model requires a ContentType instance. So, I also inserted these 2 entries in django_content_type table
with arbitrary app_label
and model
.
Something like:
| 20 | content1 | some_label | content1 |
| 21 | content2 | some_label | content2 |
Now, I was thinking that on running syncdb
permissions for these 2 new contents will be created automatically in auth_permission
, but instead, I get:
The following content types are stale and need to be deleted:
some_label | content1
some_label | content2
How do I update the permissions for these 2 contents (without model) ?