Commit 4b38af59 authored by Deamos's avatar Deamos

Refactoring Classes and DB Init to prevent cyclic importing

parent 5e91fcae
This diff is collapsed.
import os
from shared import db
import uuid
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
class Channel(db.Model):
__tablename__ = "Channel"
......
import os
from shared import db
import datetime
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
class RecordedVideo(db.Model):
__tablename__ = "RecordedVideo"
id = db.Column(db.Integer,primary_key=True)
......
from flask_security.forms import RegisterForm, StringField, Required,ConfirmRegisterForm,ForgotPasswordForm
from flask_security import UserMixin, RoleMixin
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class ExtendedRegisterForm(RegisterForm):
username = StringField('username', [Required()])
......
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class Stream(db.Model):
__tablename__ = "Stream"
......
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class banList(db.Model):
id = db.Column(db.Integer,primary_key=True)
......
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class dbVersion(db.Model):
id = db.Column(db.Integer, primary_key=True)
......
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class settings(db.Model):
id = db.Column(db.Integer, primary_key=True)
......
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
\ No newline at end of file
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class topics(db.Model):
id = db.Column(db.Integer, primary_key=True)
......
import os
basedir = os.path.abspath(os.path.dirname(__file__))
from app import db
from shared import db
class channelUpvotes(db.Model):
id = db.Column(db.Integer, primary_key=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment