Reputation: 193
I have order model, and i want add custom permission using class META
class Order(models.Model):
STATUS_CHOICES = (
('0', 'Готов'),
('1', 'Ждет оплаты'),
('2', 'Подтвержден'),
('3', 'В работе'),
('4', 'Выполнено'),
)
created = models.DateTimeField(auto_now_add=True, auto_created=True)
client = models.ForeignKey(Client)
product = models.ForeignKey(Product)
status = models.CharField(max_length=1, choices=STATUS_CHOICES, default='1')
payed = models.DateTimeField(blank=True, null=True)
edited = models.DateTimeField(auto_now=True)
class Meta(object):
permissions = (
("can_change_status", "Can change status"),
)
I haven't database. I made syncdb, but I don't see own permission not in group, not in user, not in table *auth_permission*. I've add that permission in *auth_permission* table, no effect.
Have any ideas or advice what I should do or read?
Upvotes: 1
Views: 1755