Did I find the right examples for you? yes no

All Samples(5)  |  Call(0)  |  Derive(0)  |  Import(5)

        def can_access(user):
    return user.is_authenticated() and user.is_staff
        


src/a/p/apidev-sanza-3.0.4/sanza/Users/views.py   apidev-sanza(Download)
import models, forms
from sanza.utils import logger
from sanza.permissions import can_access
from django.template.loader import get_template
from django.template import TemplateDoesNotExist

src/a/p/apidev-sanza-3.0.4/sanza/Search/views.py   apidev-sanza(Download)
from django.core.exceptions import PermissionDenied
from django.db.models import Q
from sanza.permissions import can_access
from sanza.utils import logger, log_error
from wkhtmltopdf.views import PDFTemplateView

src/a/p/apidev-sanza-3.0.4/sanza/Emailing/views.py   apidev-sanza(Download)
from django.conf import settings
from django.utils.importlib import import_module
from sanza.permissions import can_access
from utils import send_verification_email
from sanza.utils import logger, log_error

src/a/p/apidev-sanza-3.0.4/sanza/Crm/views.py   apidev-sanza(Download)
import os.path
from sanza.Crm.utils import unicode_csv_reader, resolve_city, check_city_exists, get_in_charge_users
from sanza.permissions import can_access
from sanza.utils import logger, log_error
from coop_cms.generic_views import EditableObjectView

src/a/p/apidev-sanza-3.0.4/sanza/views.py   apidev-sanza(Download)
from sanza.Search.models import Search
from django.shortcuts import get_object_or_404
from sanza.permissions import can_access
import json