forked from crunk/distribusi-verse
just commit until it works
This commit is contained in:
parent
9cecc2f30b
commit
5ce4a0f4b3
@ -2,7 +2,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from flask import render_template, Blueprint
|
from flask import render_template, Blueprint
|
||||||
from flask_login import current_user, login_required
|
from flask_login import login_required
|
||||||
from sqlalchemy.exc import (
|
from sqlalchemy.exc import (
|
||||||
DatabaseError,
|
DatabaseError,
|
||||||
DataError,
|
DataError,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"""Describe File Form to describe files in the distribusi archive"""
|
"""Describe File Form to describe files in the distribusi archive"""
|
||||||
|
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import StringField, SubmitField, validators
|
from wtforms import StringField, SubmitField
|
||||||
from wtforms.validators import Length
|
from wtforms.validators import Length
|
||||||
from wtforms.widgets import TextArea
|
from wtforms.widgets import TextArea
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
{% for id, describe_form in distribusi_file_forms.items() %}
|
{% for id, describe_form in distribusi_file_forms.items() %}
|
||||||
<div class="distribusi_file">
|
<div class="distribusi_file">
|
||||||
{% if describe_form.type == "image" %}
|
{% 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" %}
|
{% elif describe_form.type == "video" %}
|
||||||
<video src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" preload="auto" alt="" controls loading="lazy"></video>
|
<video src="{{ url_for('shortstashurl')}}/{{describe_form.file_path}}" preload="auto" alt="" controls loading="lazy"></video>
|
||||||
{% elif describe_form.type == "audio" %}
|
{% elif describe_form.type == "audio" %}
|
||||||
|
@ -4,7 +4,7 @@ import magic
|
|||||||
from distribusi.mappings import FILE_TYPES
|
from distribusi.mappings import FILE_TYPES
|
||||||
from models.distribusi_model import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.distribusi_file_model import DistribusiFiles
|
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 (
|
from sqlalchemy.exc import (
|
||||||
DatabaseError,
|
DatabaseError,
|
||||||
DataError,
|
DataError,
|
||||||
|
@ -4,7 +4,6 @@ from wtforms import (
|
|||||||
SelectField,
|
SelectField,
|
||||||
StringField,
|
StringField,
|
||||||
SubmitField,
|
SubmitField,
|
||||||
TextAreaField,
|
|
||||||
validators,
|
validators,
|
||||||
)
|
)
|
||||||
from wtforms.validators import (
|
from wtforms.validators import (
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
"""SearchForm to search files and distribusis in the distribusi archive"""
|
"""SearchForm to search files and distribusis in the distribusi archive"""
|
||||||
|
|
||||||
from flask_wtf import FlaskForm
|
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
|
|
||||||
|
|
||||||
|
|
||||||
class SearchForm(FlaskForm):
|
class SearchForm(FlaskForm):
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from whoosh.fields import *
|
from whoosh.fields import *
|
||||||
from whoosh.index import create_in, open_dir
|
from whoosh.index import create_in, open_dir
|
||||||
from whoosh.qparser import QueryParser
|
|
||||||
from models.distribusi_model import Distribusis
|
from models.distribusi_model import Distribusis
|
||||||
from models.distribusi_file_model import DistribusiFiles
|
from models.distribusi_file_model import DistribusiFiles
|
||||||
import flask_apscheduler
|
import flask_apscheduler
|
||||||
|
@ -10,7 +10,7 @@ from flask import (
|
|||||||
session,
|
session,
|
||||||
url_for,
|
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 flask_wtf.csrf import CSRFError
|
||||||
|
|
||||||
from admin import is_adminuser
|
from admin import is_adminuser
|
||||||
|
Loading…
Reference in New Issue
Block a user