sfd
This commit is contained in:
parent
80a6c1b033
commit
f8eb3679b2
2 changed files with 3 additions and 4 deletions
|
@ -93,8 +93,7 @@ def publish(pid, v):
|
|||
def submit_get(v, sub=None):
|
||||
if sub: sub = g.db.query(Sub.name).filter_by(name=sub).one_or_none()
|
||||
|
||||
if sub: sub = sub[0]
|
||||
elif request.path.startswith('/s/'): abort(404)
|
||||
if request.path.startswith('/s/') and not sub: abort(404)
|
||||
|
||||
return render_template("submit.html", v=v, sub=sub)
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
|
||||
<div class="submit-grid-view">
|
||||
<form id="submitform" action="{% if sub %}/s/{{sub}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||
<form id="submitform" action="{% if sub %}/s/{{sub.name}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
|||
general
|
||||
</option>
|
||||
{% for s in SUBS %}
|
||||
<option value="{{s}}" {% if sub == s %}selected{% endif %}>
|
||||
<option value="{{s}}" {% if sub.name == s %}selected{% endif %}>
|
||||
/s/{{s}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue