just commit until it works

This commit is contained in:
crunk 2024-11-25 15:00:09 +01:00
parent 9cecc2f30b
commit 5ce4a0f4b3
8 changed files with 6 additions and 10 deletions

View File

@ -2,7 +2,7 @@ import os
import shutil
from flask import render_template, Blueprint
from flask_login import current_user, login_required
from flask_login import login_required
from sqlalchemy.exc import (
DatabaseError,
DataError,

View File

@ -1,7 +1,7 @@
"""Describe File Form to describe files in the distribusi archive"""
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, validators
from wtforms import StringField, SubmitField
from wtforms.validators import Length
from wtforms.widgets import TextArea

View File

@ -31,7 +31,7 @@
{% for id, describe_form in distribusi_file_forms.items() %}
<div class="distribusi_file">
{% if describe_form.type == "image" %}
<img src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" alt="" data-src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" loading="lazy"/>
<img src="{{ url_for('shortstashurl')}}/{{describe_form.file_paths}}" alt="" data-src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" loading="lazy"/>
{% elif describe_form.type == "video" %}
<video src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" preload="auto" alt="" controls loading="lazy"></video>
{% elif describe_form.type == "audio" %}

View File

@ -4,7 +4,7 @@ import magic
from distribusi.mappings import FILE_TYPES
from models.distribusi_model import Distribusis
from models.distribusi_file_model import DistribusiFiles
from app import create_app, get_app, db
from app import get_app, db
from sqlalchemy.exc import (
DatabaseError,
DataError,

View File

@ -4,7 +4,6 @@ from wtforms import (
SelectField,
StringField,
SubmitField,
TextAreaField,
validators,
)
from wtforms.validators import (

View File

@ -1,9 +1,7 @@
"""SearchForm to search files and distribusis in the distribusi archive"""
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, validators
from wtforms.validators import Length
from wtforms.widgets import TextArea
from wtforms import StringField, SubmitField
class SearchForm(FlaskForm):

View File

@ -1,7 +1,6 @@
import os
from whoosh.fields import *
from whoosh.index import create_in, open_dir
from whoosh.qparser import QueryParser
from models.distribusi_model import Distribusis
from models.distribusi_file_model import DistribusiFiles
import flask_apscheduler

View File

@ -10,7 +10,7 @@ from flask import (
session,
url_for,
)
from flask_login import current_user, login_required, logout_user
from flask_login import login_required, logout_user
from flask_wtf.csrf import CSRFError
from admin import is_adminuser