From 1891efa8c68424200ecf4597fc7134a289cb5b70 Mon Sep 17 00:00:00 2001 From: Melody Horn / boringcactus Date: Wed, 16 Jun 2021 14:47:33 -0600 Subject: extend tutorial further --- examples/tutorial01/polls/migrations/mod.rs | 3 +++ examples/tutorial01/polls/mod.rs | 9 +++++++++ examples/tutorial01/polls/models.rs | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 examples/tutorial01/polls/migrations/mod.rs create mode 100644 examples/tutorial01/polls/models.rs (limited to 'examples/tutorial01') 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 -- cgit v1.2.3