(u)
return render_template('dashboard.html',
        user=u,
        is_owner=is_owner,
        projects=projects,
        page_title='Notifico! - {u.username}\'s Projects'.format(
            u=u
        )
    )
Display an overview of all the user's projects with summary
    statistics.
Display an overview of all the user's projects with summary
    statistics.
Display an overview of all the user s projects with summary statistics .
def dashboard(u):
    """
    Display an overview of all the user's projects with summary
    statistics.
    """
    u = User.by_username(u)
    if not u:
        # No such user exists.
        return abort(404)

    is_owner = (g.user and g.user.id == u.id)

    # Get all projects by decending creation date.
    projects = (
        u.projects
        .order_by(False)
        .order_by(Project.created.desc())
    )
    if not is_owner:
        # If this isn't the users own page, only
        # display public projects.
        projects = projects.filter_by(public=True)

    return render_template('dashboard.html',
        user=u,
        is_owner=is_owner,
        projects=projects,
        page_title='Notifico! - {u.username}\'s Projects'.format(
            u=u
        )
    )
def dashboard ( u ) : u = User . by_username ( u ) if not u : # No such user exists. return abort ( 404 ) is_owner = ( g . user and g . user . id == u . id ) # Get all projects by decending creation date. projects = ( u . projects . order_by ( False ) . order_by ( Project . created . desc ( ) ) ) if not is_owner : # If this isn't the users own page, only # display public projects. projects = projects . filter_by ( public = True ) return render_template ( 'dashboard.html' , user = u , is_owner = is_owner , projects = projects , page_title = 'Notifico! - {u.username}\'s Projects' . format ( u = u ) )