#NEWLINE# @ profile . route ( '/<string:username>/<string:slug>' ) #NEWLINE# @ login_required #NEWLINE# def dashboard_view( username , slug ) : #NEWLINE# #INDENT# 'Return dashboard view.\n    ' #NEWLINE# user = db . session . query ( User ) . filter ( ( User . username == username ) ) . first ( ) #NEWLINE# if ( not username ) : #NEWLINE# #INDENT# abort ( http . NOT_FOUND ) #NEWLINE# #UNINDENT# dashboard = db . session . query ( Dashboard ) . filter ( ( Dashboard . user_id == user . id ) ) . filter ( ( Dashboard . slug == slug ) ) . first ( ) #NEWLINE# if ( ( not dashboard ) or ( not can_view_dashboard ( dashboard . id ) ) ) : #NEWLINE# #INDENT# abort ( http . NOT_FOUND ) #NEWLINE# #UNINDENT# return render_template ( 'dashboard_view.jinja' , mapbox_id = current_app . config [ 'MAPBOX_ID' ] , map_type = current_app . config [ 'MAP_TYPE' ] , user = current_user , uuid = dashboard . id )