X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/5837da26db915faca89925c39fa83202bfb84e32..b07336c562d537ea3407d6a1c9fcb280dae7f514:/floof/templates/art/new.mako diff --git a/floof/templates/art/new.mako b/floof/templates/art/new.mako index 4988917..2b18b42 100644 --- a/floof/templates/art/new.mako +++ b/floof/templates/art/new.mako @@ -1,9 +1,26 @@ <%inherit file="/base.mako" />

Add New Art

-

Now: Upload a file. Later: Supply a link? Not exclusive to uploading.

+${h.form(h.url('create_art'), multipart=True)} -${h.form(h.url_for(controller='art', action='upload'), multipart=True)} -${h.file('file')} -${h.submit('submit', 'Upload!')} -${h.end_form()} \ No newline at end of file +## Todo: write some macros to make outputting form fields easier. +${normal_field(c.form.file)} + +${h.submit(None, 'Upload!')} +${h.end_form()} + + + +<%def name="normal_field(field)"> +
+${field.label()|n} +${field()|n} +%if field.errors: + +%endif +
+