1 {% extends
"base.html" %}
3 <title>Add a new product
</title>
11 <h3>Add a New Product to the Catalog
</h3>
13 <p>Enter a unique product ID. It should not contain whitespace. (An id has been auto-generated for you, in case you want to use it).
</p>
15 {% if error_message %}
16 <p><b>Error
</b>: {{error_message}}
</p>
25 <form action=
"/admin/create_product" method=
"post">
26 <input type=
"hidden" name=
"category" value=
"books" />
28 <div class=
"clearfix">
29 <label for=
"pid">product ID:
</label>
31 <input type=
"text" name=
"pid" value=
"{{pid}}" />
35 <div class=
"clearfix">
36 <label for=
"name">product name:
</label>
38 <input type=
"text" name=
"name" value=
"{{name}}" />
42 <div class=
"clearfix">
43 <label for=
"description">product
<br/>description:
</label>
45 <textarea name=
"description" rows=
"3" cols=
"80">{{description}}
</textarea>
49 <div class=
"clearfix">
50 <label for=
"price">price:
</label>
52 <input type=
"text" id=
"price" name=
"price" value=
"{{price}}"/>
56 <div class=
"clearfix">
57 <label for=
"isbn">isbn:
</label>
59 <input type=
"text" id=
"isbn" name=
"isbn" value=
"{{isbn}}"/>
63 <div class=
"clearfix">
64 <label for=
"pages">pages:
</label>
66 <input type=
"text" id=
"pages" name=
"pages" value=
"{{pages}}"/>
70 <div class=
"clearfix">
71 <label for=
"publisher">publisher:
</label>
73 <input type=
"text" id=
"publisher" name=
"publisher" value=
"{{publisher}}"/>
77 <div class=
"clearfix">
78 <label for=
"author">author:
</label>
80 <input type=
"text" id=
"author" name=
"author" value=
"{{author}}"/>
84 <div class=
"clearfix">
85 <label for=
"title">title:
</label>
87 <input type=
"text" id=
"title" name=
"title" value=
"{{title}}"/>
92 <input class=
"btn primary" id=
"subreview" name=
"subreview" type=
"submit" value=
"Create"/>
93 <input type=
"reset" class=
"btn primary" name=
"reviewreset" value=
"Clear"/>
102 <form action=
"/admin/create_product" method=
"post">
103 <input type=
"hidden" name=
"category" value=
"hd televisions" />
106 <div class=
"clearfix">
107 <label for=
"pid">product ID:
</label>
109 <input type=
"text" name=
"pid" value=
"{{pid}}" />
113 <div class=
"clearfix">
114 <label for=
"name">product name:
</label>
116 <input type=
"text" name=
"name" value=
"{{name}}" />
120 <div class=
"clearfix">
121 <label for=
"description">product
<br/>description:
</label>
123 <textarea name=
"description" rows=
"3" cols=
"80">{{description}}
</textarea>
127 <div class=
"clearfix">
128 <label for=
"price">price:
</label>
130 <input type=
"text" id=
"price" name=
"price" value=
"{{price}}"/>
134 <div class=
"clearfix">
135 <label for=
"brand">brand:
</label>
137 <input type=
"text" id=
"brand" name=
"brand" value=
"{{brand}}"/>
141 <div class=
"clearfix">
142 <label for=
"price">TV type:
</label>
144 <input type=
"text" id=
"tv_type" name=
"tv_type" value=
"{{tv_type}}"/>
148 <div class=
"clearfix">
149 <label for=
"price">size:
</label>
151 <input type=
"text" id=
"size" name=
"size" value=
"{{size}}"/>
155 <div class=
"actions">
156 <input class=
"btn primary" id=
"subreview" name=
"subreview" type=
"submit" value=
"Create"/>
157 <input type=
"reset" class=
"btn primary" name=
"reviewreset" value=
"Clear"/>
162 </div> <!-- end row -->