Depend on wtforms.
[zzz-floof.git] / floof / templates / art / new.mako
1 <%inherit file="/base.mako" />
2
3 <h1>Add New Art</h1>
4 <p>Now: Upload a file.  Later: Supply a link?  Not exclusive to uploading.</p>
5
6 ## Todo: write some macros to make outputting form fields easier.
7
8 ${h.form(h.url('create_art'), multipart=True)}
9
10 ${normal_field(c.form.by)}
11 ${normal_field(c.form.file)}
12
13
14 ##Artist: ${h.text('artist')}
15 ##${h.file('file')}
16 ${h.submit(None, 'Upload!')}
17 ${h.end_form()}
18
19
20
21 <%def name="normal_field(field)">
22 <div>
23 ${field.label()|n}
24 ${field()|n} 
25 %if field.errors:
26 <ul class="errors">
27 %for error in field.errors:
28 <li>${error}
29 %endfor
30 </ul>
31 %endif
32 </div>
33 </%def>