distribusi-verse: medium-tech web app content management system for the web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

22 lines
683 B

from flask import Blueprint, render_template
from models.distribusi_model import Distribusis
from models.distribusi_file_model import DistribusiFiles
describer = Blueprint(
"describer",
__name__,
template_folder="templates/describe_files",
static_folder="static",
)
@describer.route("/<string:distribusiname>")
def describe_distribusi_files(distribusiname):
distribusi = Distribusis.query.filter_by(
distribusiname=distribusiname
).first()
distribusi_files = DistribusiFiles.query.filter_by(
distribusi=distribusi.id
).all()
print(distribusi_files)
return render_template("describe.html", distribusi_files=distribusi_files)