Hi all, I'm newbie in Django so probably this is just a stupid error. After read a lot of doc can't figure out how access a specific permission to check it.
I wrote some model with a custom permission: # In test_app/models.py def SomeModel(models.Model): ... class Meta: Permissions( 'custom_permission', 'Short Description.' ) and then in views I want check if the "user" have the custom permission with: # in test_app_views.py from test_app.models import * def some_view(request): ... request.user.has_perm(SomeModel.custom_permission) and things don't work. What I must put inside has_perm function to get a custom permission defined in a Model? Cheers Frank Abel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---