(user, project)
return obj.access if obj else ""
CSS class returned based on access to a project
CSS class returned based on access to a project
CSS class returned based on access to a project
def access_class(user, project):
    """
    CSS class returned based on access to a project
    """

    if user.is_anonymous:
        return ""

    if user == project.owner:
        return "write_access"

    obj = Access.objects.filter(user=user, project=project).first()

    return obj.access if obj else ""
def access_class ( user , project ) : if user . is_anonymous : return "" if user == project . owner : return "write_access" obj = Access . objects . filter ( user = user , project = project ) . first ( ) return obj . access if obj else ""