snake case model files

This commit is contained in:
crunk 2024-04-28 15:34:29 +02:00
parent 7f6a373e8d
commit 48b6e6f211
17 changed files with 40 additions and 23 deletions

View File

@ -13,8 +13,8 @@ from app import db
from distribusikan.distribusisinfo import DistribusisInfo
from forms.admindistribusiform import AdminDistribusiForm
from forms.adminuserform import AdminUserForm
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
def AdminPage():

View File

@ -8,8 +8,8 @@ from sqlalchemy.exc import (
)
from app import create_app, db
from models.distribusimodel import Distribusis # noqa: F401
from models.usermodel import User # noqa: F401
from models.distribusi_model import Distribusis # noqa: F401
from models.user_model import User # noqa: F401
def admintool():

View File

@ -3,10 +3,10 @@ def deploy():
from flask_migrate import init, migrate, stamp, upgrade
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
from models.usermodel import User # noqa: F401
from models.user_model import User # noqa: F401
app = create_app()
app.app_context().push()

View File

@ -17,8 +17,8 @@ from forms.publicthemeform import PublicThemeForm
from forms.selectorform import SelectorForm
from forms.themeform import ThemeForm
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
# UserPengguna
from statuspengguna.helper import UserHelper

View File

@ -1,7 +1,7 @@
from flask_login import current_user
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
class DistribusisInfo:

View File

@ -24,8 +24,8 @@ from forms.themeform import ThemeForm
# Forms!
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
# UserPengguna
from statuspengguna.helper import UserHelper

View File

@ -20,7 +20,7 @@ from forms.publicthemeform import PublicThemeForm
from forms.selectorform import SelectorForm
from forms.themeform import ThemeForm
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.distribusi_model import Distribusis
from statuspengguna.helper import UserHelper

View File

@ -14,8 +14,8 @@ from sqlalchemy.exc import (
from app import db
from distribusikan.distribusiselector import SelectCurrentDistribusi
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
from statuspengguna.helper import UserHelper

View File

@ -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

View File

@ -22,8 +22,8 @@ from distribusikan.distribusisinfo import DistribusisInfo
# Use upload form to populate filters
from forms.uploadform import UploadForm
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
from statuspengguna.forgotpassword import forgot_password
from statuspengguna.helper import UserHelper
from statuspengguna.loginuser import login_section

View File

@ -12,7 +12,7 @@ from sqlalchemy.exc import (
from app import db, get_app
from forms.forgotpasswordform import ForgotPasswordForm
from models.usermodel import User
from models.user_model import User
mail = Mail(get_app())
forgot_password = Blueprint(

View File

@ -11,8 +11,8 @@ from sqlalchemy.exc import (
from app import db
from distribusikan.distribusisinfo import DistribusisInfo
from models.distribusimodel import Distribusis
from models.usermodel import User
from models.distribusi_model import Distribusis
from models.user_model import User
class UserHelper:

View File

@ -13,7 +13,7 @@ from flask_bcrypt import check_password_hash
from flask_login import login_user
from forms.loginform import LoginForm
from models.usermodel import User
from models.user_model import User
login_section = Blueprint(
"login",

View File

@ -12,7 +12,7 @@ from werkzeug.routing import BuildError
from app import db
from forms.registerform import RegisterForm
from models.usermodel import User
from models.user_model import User
register_user = Blueprint(
"register",

View File

@ -14,7 +14,7 @@ from werkzeug.routing import BuildError
from app import db
from forms.resetpasswordform import ResetPasswordForm
from models.usermodel import User
from models.user_model import User
from statuspengguna import statuspengguna
reset_password = Blueprint(