from .models import Resource | from .models import Resource | ||||
from .resources import * | from .resources import * | ||||
from .relationships import * | from .relationships import * | ||||
from werkzeug.exceptions import abort | |||||
from . import db | from . import db | ||||
import os | import os | ||||
from .models import Relationship | from .models import Relationship | ||||
from .resources import * | from .resources import * | ||||
from .relationships import * | from .relationships import * | ||||
from werkzeug.exceptions import abort | |||||
from . import db | from . import db | ||||
import os | import os | ||||
from flask import Blueprint, render_template | from flask import Blueprint, render_template | ||||
from flask_login import login_required, current_user | from flask_login import login_required, current_user | ||||
from . import db | |||||
from .models import Resource | from .models import Resource | ||||
from sqlalchemy.sql import func | from sqlalchemy.sql import func | ||||
import markdown | import markdown |
from flask_login import UserMixin | from flask_login import UserMixin | ||||
from . import db | from . import db | ||||
from . import ma | |||||
from datetime import datetime | from datetime import datetime | ||||
from marshmallow import Schema | |||||
# table for users | # table for users | ||||
class User(UserMixin, db.Model): | class User(UserMixin, db.Model): |
from .models import Resource | from .models import Resource | ||||
from .resources import * | from .resources import * | ||||
from .relationships import * | from .relationships import * | ||||
from werkzeug.exceptions import abort | |||||
from . import db | from . import db | ||||
import os | import os | ||||
# @purpose: functions for relationships | # @purpose: functions for relationships | ||||
# @acknowledgements: | # @acknowledgements: | ||||
from flask import Blueprint, render_template, request, flash, redirect, url_for | |||||
from .models import Resource | from .models import Resource | ||||
from .models import Relationship | from .models import Relationship | ||||
from werkzeug.exceptions import abort | |||||
from . import db | from . import db | ||||
# function to retrieve linked resources | # function to retrieve linked resources |
# https://stackoverflow.com/questions/59721478/serializing-sqlalchemy-with-marshmallow | # https://stackoverflow.com/questions/59721478/serializing-sqlalchemy-with-marshmallow | ||||
from . import ma | from . import ma | ||||
from marshmallow import Schema | |||||
# schema for JSON transformation of User table via Marshmallow | # schema for JSON transformation of User table via Marshmallow | ||||
class UserSchema(ma.Schema): | class UserSchema(ma.Schema): |
from .models import Resource | from .models import Resource | ||||
from .resources import * | from .resources import * | ||||
from .relationships import * | from .relationships import * | ||||
from werkzeug.exceptions import abort | |||||
from . import db | from . import db | ||||
import os | import os | ||||