'Returns list of permissions in format *<app_label>.<codename>* that
should be checked against *request.user* and *object*. By default, it
returns list from ``permission_required`` attribute.
:param request: Original request.'

def get_required_permissions(self, request=None):

    if isinstance(self.permission_required, basestring):
        perms = [self.permission_required]
    elif isinstance(self.permission_required, Iterable):
        perms = [p for p in self.permission_required]
    else:
        raise ImproperlyConfigured((u"'PermissionRequiredMixin'    requires    'permission_required'    attribute    to    be    set    to    '<app_label>.<permission    codename>'    but    is    set    to    '%s'    instead" % self.permission_required))
    return perms
