Add ValueType

This commit is contained in:
Sam Samai 2021-09-03 22:41:02 +10:00
parent 71926cfd4b
commit 4cb5bf962b
3 changed files with 19 additions and 4 deletions

View File

@ -35,6 +35,8 @@ pub enum PrimaryKey {
} }
impl PrimaryKeyTrait for PrimaryKey { impl PrimaryKeyTrait for PrimaryKey {
type ValueType = i32;
fn auto_increment() -> bool { fn auto_increment() -> bool {
true true
} }

View File

@ -24,5 +24,10 @@
</tbody> </tbody>
</table> </table>
<p><a href="/new">Add Post</a></p> <div class="twelve columns">
<a href="/new">
<input type="button" value="add post" />
</a>
</div>
{% endblock content %} {% endblock content %}

View File

@ -2,7 +2,7 @@
<div class="row"> <div class="row">
<h4>New Post</h4> <h4>New Post</h4>
<form action="/" method="post"> <form action="/" method="post">
<div class="ten columns"> <div class="twelve columns">
<input <input
type="text" type="text"
placeholder="enter title" placeholder="enter title"
@ -22,8 +22,16 @@
class="u-full-width" class="u-full-width"
/> />
</div> </div>
<div class="twelve columns">
<div class="two columns"> <div class="two columns">
<input type="submit" value="add post" /> <a href="/">
<input type="button" value="cancel" />
</a>
</div>
<div class="eight columns"></div>
<div class="two columns">
<input type="submit" value="save post" />
</div>
</div> </div>
</form> </form>
</div> </div>