Beispiel #1
0
"""

# 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')
Beispiel #2
0
"""

# 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')
Beispiel #3
0
"""

# 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')
Beispiel #4
0
"""

# 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')
Beispiel #7
0
"""

# 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')
Beispiel #10
0
"""

# 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')
Beispiel #11
0
"""

# 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')