forked from crunk/distribusi-verse
snake case model files
This commit is contained in:
parent
7f6a373e8d
commit
48b6e6f211
@ -13,8 +13,8 @@ from app import db
|
|||||||
from distribusikan.distribusisinfo import DistribusisInfo
|
from distribusikan.distribusisinfo import DistribusisInfo
|
||||||
from forms.admindistribusiform import AdminDistribusiForm
|
from forms.admindistribusiform import AdminDistribusiForm
|
||||||
from forms.adminuserform import AdminUserForm
|
from forms.adminuserform import AdminUserForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
|
|
||||||
def AdminPage():
|
def AdminPage():
|
||||||
|
@ -8,8 +8,8 @@ from sqlalchemy.exc import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from app import create_app, db
|
from app import create_app, db
|
||||||
from models.distribusimodel import Distribusis # noqa: F401
|
from models.distribusi_model import Distribusis # noqa: F401
|
||||||
from models.usermodel import User # noqa: F401
|
from models.user_model import User # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
def admintool():
|
def admintool():
|
||||||
|
@ -3,10 +3,10 @@ def deploy():
|
|||||||
from flask_migrate import init, migrate, stamp, upgrade
|
from flask_migrate import init, migrate, stamp, upgrade
|
||||||
|
|
||||||
from app import create_app, db
|
from app import create_app, db
|
||||||
from models.distribusimodel import Distribusis # noqa: F401
|
from models.distribusi_model import Distribusis # noqa: F401
|
||||||
|
|
||||||
# This model is required for flask_migrate to make the table
|
# This model is required for flask_migrate to make the table
|
||||||
from models.usermodel import User # noqa: F401
|
from models.user_model import User # noqa: F401
|
||||||
|
|
||||||
app = create_app()
|
app = create_app()
|
||||||
app.app_context().push()
|
app.app_context().push()
|
||||||
|
@ -17,8 +17,8 @@ from forms.publicthemeform import PublicThemeForm
|
|||||||
from forms.selectorform import SelectorForm
|
from forms.selectorform import SelectorForm
|
||||||
from forms.themeform import ThemeForm
|
from forms.themeform import ThemeForm
|
||||||
from forms.uploadform import UploadForm
|
from forms.uploadform import UploadForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
# UserPengguna
|
# UserPengguna
|
||||||
from statuspengguna.helper import UserHelper
|
from statuspengguna.helper import UserHelper
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
|
|
||||||
class DistribusisInfo:
|
class DistribusisInfo:
|
||||||
|
@ -24,8 +24,8 @@ from forms.themeform import ThemeForm
|
|||||||
|
|
||||||
# Forms!
|
# Forms!
|
||||||
from forms.uploadform import UploadForm
|
from forms.uploadform import UploadForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
# UserPengguna
|
# UserPengguna
|
||||||
from statuspengguna.helper import UserHelper
|
from statuspengguna.helper import UserHelper
|
||||||
|
@ -20,7 +20,7 @@ from forms.publicthemeform import PublicThemeForm
|
|||||||
from forms.selectorform import SelectorForm
|
from forms.selectorform import SelectorForm
|
||||||
from forms.themeform import ThemeForm
|
from forms.themeform import ThemeForm
|
||||||
from forms.uploadform import UploadForm
|
from forms.uploadform import UploadForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from statuspengguna.helper import UserHelper
|
from statuspengguna.helper import UserHelper
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,8 +14,8 @@ from sqlalchemy.exc import (
|
|||||||
from app import db
|
from app import db
|
||||||
from distribusikan.distribusiselector import SelectCurrentDistribusi
|
from distribusikan.distribusiselector import SelectCurrentDistribusi
|
||||||
from forms.uploadform import UploadForm
|
from forms.uploadform import UploadForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
from statuspengguna.helper import UserHelper
|
from statuspengguna.helper import UserHelper
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
from app import db
|
||||||
|
|
||||||
|
|
||||||
|
class DistribusiFiles(db.Model):
|
||||||
|
"""Distribusi file model class for a single file in a distribusi"""
|
||||||
|
|
||||||
|
__tablename__ = "distribusi_files"
|
||||||
|
|
||||||
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
|
type = db.Column(db.String(300), nullable=False, unique=True)
|
||||||
|
distribusi = db.Column(db.Integer, db.ForeignKey("distribusis.id"))
|
||||||
|
path = db.Column(db.String(4096), nullable=True, unique=False)
|
||||||
|
description = db.Column(db.String(9), nullable=True, unique=False)
|
||||||
|
tags = db.Column(db.String(500), nullable=True, unique=False)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return "<Distribusi_File %r>" % self.distribusiname
|
@ -22,8 +22,8 @@ from distribusikan.distribusisinfo import DistribusisInfo
|
|||||||
|
|
||||||
# Use upload form to populate filters
|
# Use upload form to populate filters
|
||||||
from forms.uploadform import UploadForm
|
from forms.uploadform import UploadForm
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
from statuspengguna.forgotpassword import forgot_password
|
from statuspengguna.forgotpassword import forgot_password
|
||||||
from statuspengguna.helper import UserHelper
|
from statuspengguna.helper import UserHelper
|
||||||
from statuspengguna.loginuser import login_section
|
from statuspengguna.loginuser import login_section
|
||||||
|
@ -12,7 +12,7 @@ from sqlalchemy.exc import (
|
|||||||
|
|
||||||
from app import db, get_app
|
from app import db, get_app
|
||||||
from forms.forgotpasswordform import ForgotPasswordForm
|
from forms.forgotpasswordform import ForgotPasswordForm
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
mail = Mail(get_app())
|
mail = Mail(get_app())
|
||||||
forgot_password = Blueprint(
|
forgot_password = Blueprint(
|
||||||
|
@ -11,8 +11,8 @@ from sqlalchemy.exc import (
|
|||||||
|
|
||||||
from app import db
|
from app import db
|
||||||
from distribusikan.distribusisinfo import DistribusisInfo
|
from distribusikan.distribusisinfo import DistribusisInfo
|
||||||
from models.distribusimodel import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
|
|
||||||
class UserHelper:
|
class UserHelper:
|
||||||
|
@ -13,7 +13,7 @@ from flask_bcrypt import check_password_hash
|
|||||||
from flask_login import login_user
|
from flask_login import login_user
|
||||||
|
|
||||||
from forms.loginform import LoginForm
|
from forms.loginform import LoginForm
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
login_section = Blueprint(
|
login_section = Blueprint(
|
||||||
"login",
|
"login",
|
||||||
|
@ -12,7 +12,7 @@ from werkzeug.routing import BuildError
|
|||||||
|
|
||||||
from app import db
|
from app import db
|
||||||
from forms.registerform import RegisterForm
|
from forms.registerform import RegisterForm
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
|
|
||||||
register_user = Blueprint(
|
register_user = Blueprint(
|
||||||
"register",
|
"register",
|
||||||
|
@ -14,7 +14,7 @@ from werkzeug.routing import BuildError
|
|||||||
|
|
||||||
from app import db
|
from app import db
|
||||||
from forms.resetpasswordform import ResetPasswordForm
|
from forms.resetpasswordform import ResetPasswordForm
|
||||||
from models.usermodel import User
|
from models.user_model import User
|
||||||
from statuspengguna import statuspengguna
|
from statuspengguna import statuspengguna
|
||||||
|
|
||||||
reset_password = Blueprint(
|
reset_password = Blueprint(
|
||||||
|
Loading…
Reference in New Issue
Block a user