Hi friends, I haver another problem. I created a custom permission, but when I write a condition, always return False. For example: -------------------models.py------------------------ class Book(models.Model): title = models.CharField(verbose_name = "Title", max_length = 150) author = models.ManyToManyField(Author, verbose_name = "Author") date = models.DateField(verbose_name = "Publication date")
class Meta: db_table = u'main_book' ordering = ['-date'] permissions = ( ("can_vote", "Can vote"), ) def __unicode__(self): return self.title Then, "can_vote" appears in user permissions. In my template I wrote: {% if perms.myapp.can_vote %} do something {% endif %} But it return False, because don't do anything. Why? I'm wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---