diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-18 10:12:16 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-18 10:12:16 -0600 |
commit | 709eb44ccb8d08ad7f26cdac2932eadc7ccd48e7 (patch) | |
tree | cc4aa6854147c0dc74bbd3bea9b8b9cfc083b62f /src/bin | |
parent | 3b880c0ae7963d783fb87a3389f98070e448495a (diff) | |
download | tosin-709eb44ccb8d08ad7f26cdac2932eadc7ccd48e7.tar.gz tosin-709eb44ccb8d08ad7f26cdac2932eadc7ccd48e7.zip |
make model metadata available in AppConfig
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/tosin-admin.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/tosin-admin.rs b/src/bin/tosin-admin.rs index 0a359d3..a0ea850 100644 --- a/src/bin/tosin-admin.rs +++ b/src/bin/tosin-admin.rs @@ -38,8 +38,10 @@ pub mod views; pub use urls::urls; +#[allow(dead_code)] pub const APP: AppConfig = AppConfig { name: module_path!(), + models: models::ALL, migrations: migrations::migrations, }; "#; @@ -49,9 +51,12 @@ use tosin::db::migration::{Migration, gather}; gather!(); "#; const APP_MODELS: &str = r#" -use tosin::db::models::{Model, Id}; +#[allow(unused_imports)] +use tosin::db::models::{Model, Id, gather}; // TODO define models + +gather!(); "#; const APP_URLS: &str = r#" use tosin::urls::{UrlMap, url_map}; |