forked from MarseyWorld/MarseyWorld
expose the pngs
parent
98192c7b00
commit
3e6a3ef52d
|
@ -1,4 +1,5 @@
|
||||||
from shutil import move, copyfile
|
from shutil import move, copyfile
|
||||||
|
from os import listdir
|
||||||
|
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter
|
||||||
from files.helpers.const import *
|
from files.helpers.const import *
|
||||||
|
@ -7,6 +8,13 @@ from files.helpers.media import *
|
||||||
from files.helpers.wrappers import *
|
from files.helpers.wrappers import *
|
||||||
from files.routes.static import marsey_list
|
from files.routes.static import marsey_list
|
||||||
|
|
||||||
|
@app.get('/asset_submissions/marseys')
|
||||||
|
@auth_required
|
||||||
|
def asset_submissions_marseys(v):
|
||||||
|
images = [x for x in listdir("/asset_submissions/marseys") if x.endswith('png')]
|
||||||
|
return render_template("asset_submissions.html", v=v, images=images)
|
||||||
|
|
||||||
|
|
||||||
@app.get('/asset_submissions/<path:path>')
|
@app.get('/asset_submissions/<path:path>')
|
||||||
@limiter.exempt
|
@limiter.exempt
|
||||||
def asset_submissions(path):
|
def asset_submissions(path):
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
{% extends "default.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
|
||||||
|
</pre>
|
||||||
|
<div class="overflow-x-auto"><table class="table table-striped mb-5">
|
||||||
|
<thead class="bg-primary text-white">
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Image</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="marseys-table">
|
||||||
|
{% for image in images %}
|
||||||
|
<tr>
|
||||||
|
<td>{{loop.index}}</td>
|
||||||
|
<td>{{image}}</td>
|
||||||
|
<td><img loading="lazy" data-bs-toggle="tooltip" src="/asset_submissions/marseys/{{image}}"></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue