projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed a little s/// failure in the user view template.
[zzz-floof.git]
/
floof
/
templates
/
art
/
new.mako
diff --git
a/floof/templates/art/new.mako
b/floof/templates/art/new.mako
index
97cac9e
..
2b18b42
100644
(file)
--- a/
floof/templates/art/new.mako
+++ b/
floof/templates/art/new.mako
@@
-1,10
+1,26
@@
<%inherit file="/base.mako" />
<h1>Add New Art</h1>
<%inherit file="/base.mako" />
<h1>Add New Art</h1>
-<p>Now: Upload a file. Later: Supply a link? Not exclusive to uploading.</p>
-
${h.form(h.url('create_art'), multipart=True)}
${h.form(h.url('create_art'), multipart=True)}
-Artist: ${h.text('artist')}
-${h.file('file')}
+
+## Todo: write some macros to make outputting form fields easier.
+${normal_field(c.form.file)}
+
${h.submit(None, 'Upload!')}
${h.end_form()}
${h.submit(None, 'Upload!')}
${h.end_form()}
+
+
+
+<%def name="normal_field(field)">
+<div>
+${field.label()|n}
+${field()|n}
+%if field.errors:
+<ul class="errors">
+%for error in field.errors:
+<li>${error}
+%endfor
+</ul>
+%endif
+</div>
+</%def>