from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) from ucsd_bisb_unofficial.rotation_database import RotationDatabase from ucsd_bisb_unofficial.markdown_table import markdown_table # Blueprint assignment ========================================================= bp = Blueprint('lab', __name__, url_prefix='/lab') # Functions ==================================================================== index = construct_index_route(bp, 'lab') create = construct_create_route(bp, 'lab') update = construct_update_route(bp, 'lab') delete = construct_delete_route(bp, 'lab') detail = construct_detail_route(bp, 'lab') comment = construct_comment_route(bp, 'lab') delete_comment = construct_delete_comment_route(bp, 'lab') @bp.route('/rotations') @login_required @named_permission.require(http_exception=403) def rotations(): """Render the rotation database""" quarter = request.args.get('quarter', 'fall-2020', type=str) if quarter == 'fall-2019':
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('td', __name__, url_prefix='/td') # Functions ==================================================================== index = construct_index_route(bp, 'td') create = construct_create_route(bp, 'td') update = construct_update_route(bp, 'td') delete = construct_delete_route(bp, 'td') detail = construct_detail_route(bp, 'td') comment = construct_comment_route(bp, 'td') delete_comment = construct_delete_comment_route(bp, 'td')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('committee', __name__, url_prefix='/committee') # Functions ==================================================================== index = construct_index_route(bp, 'committee') create = construct_create_route(bp, 'committee') update = construct_update_route(bp, 'committee') delete = construct_delete_route(bp, 'committee') detail = construct_detail_route(bp, 'committee') comment = construct_comment_route(bp, 'committee') delete_comment = construct_delete_comment_route(bp, 'committee')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('townhall', __name__, url_prefix='/townhall') # Functions ==================================================================== index = construct_index_route(bp, 'townhall') create = construct_create_route(bp, 'townhall') update = construct_update_route(bp, 'townhall') delete = construct_delete_route(bp, 'townhall') detail = construct_detail_route(bp, 'townhall') comment = construct_comment_route(bp, 'townhall') delete_comment = construct_delete_comment_route(bp, 'townhall')
from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route ) # Blueprint assignment ========================================================= bp = Blueprint('mental_health', __name__, url_prefix='/mental_health') # Functions ==================================================================== index = construct_index_route(bp, 'mental_health') create = construct_create_route(bp, 'mental_health') update = construct_update_route(bp, 'mental_health') delete = construct_delete_route(bp, 'mental_health') detail = construct_detail_route(bp, 'mental_health') comment = construct_comment_route(bp, 'mental_health') delete_comment = construct_delete_comment_route(bp, 'mental_health')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('stats', __name__, url_prefix='/stats') # Functions ==================================================================== index = construct_index_route(bp, 'stats') create = construct_create_route(bp, 'stats') update = construct_update_route(bp, 'stats') delete = construct_delete_route(bp, 'stats') detail = construct_detail_route(bp, 'stats') comment = construct_comment_route(bp, 'stats') delete_comment = construct_delete_comment_route(bp, 'stats')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route, construct_index_route) # Blueprint assignment ========================================================= bp = Blueprint('residency', __name__, url_prefix='/residency') # Functions ==================================================================== index = construct_index_route(bp, 'residency') create = construct_create_route(bp, 'residency') update = construct_update_route(bp, 'residency') delete = construct_delete_route(bp, 'residency') detail = construct_detail_route(bp, 'residency') comment = construct_comment_route(bp, 'residency') delete_comment = construct_delete_comment_route(bp, 'residency')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route, construct_index_route) # Blueprint assignment ========================================================= bp = Blueprint('seminars', __name__, url_prefix='/seminars') # Functions ==================================================================== index = construct_index_route(bp, 'seminars') create = construct_create_route(bp, 'seminars') update = construct_update_route(bp, 'seminars') delete = construct_delete_route(bp, 'seminars') detail = construct_detail_route(bp, 'seminars') comment = construct_comment_route(bp, 'seminars') delete_comment = construct_delete_comment_route(bp, 'seminars')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('anti_racism', __name__, url_prefix='/anti_racism') # Functions ==================================================================== index = construct_index_route(bp, 'anti_racism') create = construct_create_route(bp, 'anti_racism') update = construct_update_route(bp, 'anti_racism') delete = construct_delete_route(bp, 'anti_racism') detail = construct_detail_route(bp, 'anti_racism') comment = construct_comment_route(bp, 'anti_racism') delete_comment = construct_delete_comment_route(bp, 'anti_racism')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('fellowships', __name__, url_prefix='/fellowships') # Functions ==================================================================== index = construct_index_route(bp, 'fellowships') create = construct_create_route(bp, 'fellowships') update = construct_update_route(bp, 'fellowships') delete = construct_delete_route(bp, 'fellowships') detail = construct_detail_route(bp, 'fellowships') comment = construct_comment_route(bp, 'fellowships') delete_comment = construct_delete_comment_route(bp, 'fellowships')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('courses', __name__, url_prefix='/courses') # Functions ==================================================================== index = construct_index_route(bp, 'courses') create = construct_create_route(bp, 'courses') update = construct_update_route(bp, 'courses') delete = construct_delete_route(bp, 'courses') detail = construct_detail_route(bp, 'courses') comment = construct_comment_route(bp, 'courses') delete_comment = construct_delete_comment_route(bp, 'courses')
# Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route, construct_index_route) # Blueprint assignment ========================================================= bp = Blueprint('tech', __name__, url_prefix='/tech') # Functions ==================================================================== index = construct_index_route(bp, 'tech') create = construct_create_route(bp, 'tech') update = construct_update_route(bp, 'tech') delete = construct_delete_route(bp, 'tech') detail = construct_detail_route(bp, 'tech') comment = construct_comment_route(bp, 'tech') delete_comment = construct_delete_comment_route(bp, 'tech')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('exam', __name__, url_prefix='/exam') # Functions ==================================================================== index = construct_index_route(bp, 'exam') create = construct_create_route(bp, 'exam') update = construct_update_route(bp, 'exam') delete = construct_delete_route(bp, 'exam') detail = construct_detail_route(bp, 'exam') comment = construct_comment_route(bp, 'exam') delete_comment = construct_delete_comment_route(bp, 'exam')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route, construct_index_route) # Blueprint assignment ========================================================= bp = Blueprint('news', __name__, url_prefix='/news') # Functions ==================================================================== index = construct_index_route(bp, 'news') create = construct_create_route(bp, 'news') update = construct_update_route(bp, 'news') delete = construct_delete_route(bp, 'news') detail = construct_detail_route(bp, 'news') comment = construct_comment_route(bp, 'news') delete_comment = construct_delete_comment_route(bp, 'news')
""" # Imports ====================================================================== from flask import (Blueprint, flash, g, redirect, render_template, request, url_for) from flask_login import current_user, login_required from werkzeug.exceptions import abort from ucsd_bisb_unofficial.forms import PostForm from ucsd_bisb_unofficial.models import get_db, Post from ucsd_bisb_unofficial.principals import named_permission from ucsd_bisb_unofficial.blog import ( get_post, construct_index_route, construct_create_route, construct_update_route, construct_delete_route, construct_detail_route, construct_comment_route, construct_delete_comment_route) # Blueprint assignment ========================================================= bp = Blueprint('outreach', __name__, url_prefix='/outreach') # Functions ==================================================================== index = construct_index_route(bp, 'outreach') create = construct_create_route(bp, 'outreach') update = construct_update_route(bp, 'outreach') delete = construct_delete_route(bp, 'outreach') detail = construct_detail_route(bp, 'outreach') comment = construct_comment_route(bp, 'outreach') delete_comment = construct_delete_comment_route(bp, 'outreach')
return render_template('career/example-position.html') @bp.route('/companies') @login_required @named_permission.require(http_exception=403) def companies(): """Render the company databse""" return render_template('career/companies.html', table=markdown_table( current_app.config['COMPANIES_CSV'])) @bp.route('/older-job-openings') @login_required @named_permission.require(http_exception=403) def older_job_openings(): """Render older job openings""" return render_template('career/older-job-openings.html') index = construct_index_route(bp, 'career') create = construct_create_route(bp, 'career') update = construct_update_route(bp, 'career') delete = construct_delete_route(bp, 'career') detail = construct_detail_route(bp, 'career') comment = construct_comment_route(bp, 'career') delete_comment = construct_delete_comment_route(bp, 'career')