redistribusi for adding exif
This commit is contained in:
parent
e5d8da2568
commit
c8b1171cad
@ -19,7 +19,7 @@ from app import db
|
||||
from models.distribusi_model import Distribusis
|
||||
from models.distribusi_file_model import DistribusiFiles
|
||||
from describer.forms.describe_files_form import DescribeFilesForm
|
||||
|
||||
from describer.forms.redistribusi_form import ReDistribusiForm
|
||||
|
||||
describer = Blueprint(
|
||||
"describer",
|
||||
@ -37,9 +37,28 @@ def show_distribusi_files(distribusiname):
|
||||
distribusi = Distribusis.query.filter_by(
|
||||
distribusiname=distribusiname
|
||||
).first()
|
||||
redistribusi_form = ReDistribusiForm()
|
||||
distribusi_file_forms = get_distribusi_file_forms(distribusi.id)
|
||||
return render_template(
|
||||
"describe.html",
|
||||
distribusiname=distribusiname,
|
||||
redistribusi_form=redistribusi_form,
|
||||
distribusi_file_forms=distribusi_file_forms,
|
||||
)
|
||||
|
||||
|
||||
@describer.route("/redistribusi/<string:distribusiname>")
|
||||
@login_required
|
||||
def re_distribusi_files(distribusiname):
|
||||
distribusi = Distribusis.query.filter_by(
|
||||
distribusiname=distribusiname
|
||||
).first()
|
||||
redistribusi_form = ReDistribusiForm()
|
||||
distribusi_file_forms = get_distribusi_file_forms(distribusi.id)
|
||||
return render_template(
|
||||
"describe.html",
|
||||
distribusiname=distribusiname,
|
||||
redistribusi_form=redistribusi_form,
|
||||
distribusi_file_forms=distribusi_file_forms,
|
||||
)
|
||||
|
||||
|
@ -2,7 +2,7 @@ from flask_wtf import FlaskForm
|
||||
from wtforms import SubmitField
|
||||
|
||||
|
||||
class DistribusiForm(FlaskForm):
|
||||
"""Distribusi class to launch your distribusi website"""
|
||||
class ReDistribusiForm(FlaskForm):
|
||||
"""Re-Distribusi form class to re-distrusi with desribed files"""
|
||||
|
||||
submit = SubmitField("Re-Distribusi!")
|
||||
|
@ -70,5 +70,8 @@
|
||||
</div>
|
||||
{% endfor%}
|
||||
</div>
|
||||
{% block redistribusi %}
|
||||
{% include "redistribusi.html" %}
|
||||
{% endblock redistribusi%}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
14
verse/describer/templates/describe_files/redistribusi.html
Normal file
14
verse/describer/templates/describe_files/redistribusi.html
Normal file
@ -0,0 +1,14 @@
|
||||
<div class="redistribusi">
|
||||
<p class="tooltip">Run distribusi again after describing your files.<span class="tooltiptext">Distribusi will run again and add your alttext and descriptions.
|
||||
</span></p>
|
||||
<form id={{distribusiname}} method="POST" enctype="multipart/form-data" action="{{ url_for('describer.re_distribusi_files', distribusiname=distribusiname) }}">
|
||||
{{ redistribusi_form.csrf_token }}
|
||||
<fieldset class="">
|
||||
{{ redistribusi_form.submit.label }}
|
||||
{{ redistribusi_form.submit }}
|
||||
{% for message in redistribusi_form.submit.errors %}
|
||||
<div class="error">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user