aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial01
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-16 14:47:33 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-16 14:47:33 -0600
commit1891efa8c68424200ecf4597fc7134a289cb5b70 (patch)
treee3ff6c85fcc1e052226e0dc48312733ce10a43f3 /examples/tutorial01
parent58d2f63f4577bc701b6bd655064cefebb65118b4 (diff)
downloadtosin-1891efa8c68424200ecf4597fc7134a289cb5b70.tar.gz
tosin-1891efa8c68424200ecf4597fc7134a289cb5b70.zip
extend tutorial further
Diffstat (limited to 'examples/tutorial01')
-rw-r--r--examples/tutorial01/polls/migrations/mod.rs3
-rw-r--r--examples/tutorial01/polls/mod.rs9
-rw-r--r--examples/tutorial01/polls/models.rs3
3 files changed, 15 insertions, 0 deletions
diff --git a/examples/tutorial01/polls/migrations/mod.rs b/examples/tutorial01/polls/migrations/mod.rs
new file mode 100644
index 0000000..64efe8d
--- /dev/null
+++ b/examples/tutorial01/polls/migrations/mod.rs
@@ -0,0 +1,3 @@
+use tosin::db::migration::{Migration, gather};
+
+gather!();
diff --git a/examples/tutorial01/polls/mod.rs b/examples/tutorial01/polls/mod.rs
index d22af0f..0b039d9 100644
--- a/examples/tutorial01/polls/mod.rs
+++ b/examples/tutorial01/polls/mod.rs
@@ -1,4 +1,13 @@
+use tosin::apps::AppConfig;
+
+mod migrations;
+pub mod models;
pub mod urls;
pub mod views;
pub use urls::urls;
+
+pub const APP: AppConfig = AppConfig {
+ name: module_path!(),
+ migrations: migrations::migrations,
+};
diff --git a/examples/tutorial01/polls/models.rs b/examples/tutorial01/polls/models.rs
new file mode 100644
index 0000000..82aa7fd
--- /dev/null
+++ b/examples/tutorial01/polls/models.rs
@@ -0,0 +1,3 @@
+use tosin::db::models::{Model, Id};
+
+// TODO define models