diff --git a/core/form/form_app.go b/core/form/form_app.go index c2695ee..34237d3 100644 --- a/core/form/form_app.go +++ b/core/form/form_app.go @@ -14,9 +14,13 @@ import ( func Configure(l *goapp.Lifecycle, conf *config.Config) { - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("form", GetEmbedFS()) + return nil + }) + + l.Prepare(func(app *goapp.App) error { pongo := app.Get("gonode.pongo").(*pongo2.TemplateSet) pongo.Globals["form_field"] = createPongoField(pongo) diff --git a/modules/blog/blog_app.go b/modules/blog/blog_app.go index b323c81..1310a5c 100644 --- a/modules/blog/blog_app.go +++ b/modules/blog/blog_app.go @@ -19,7 +19,7 @@ func Configure(l *goapp.Lifecycle, conf *config.Config) { return nil }) - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("blog", GetEmbedFS()) return nil diff --git a/modules/bootstrap/bootstrap_app.go b/modules/bootstrap/bootstrap_app.go index cd0c9c1..23875fe 100644 --- a/modules/bootstrap/bootstrap_app.go +++ b/modules/bootstrap/bootstrap_app.go @@ -13,7 +13,7 @@ import ( func Configure(l *goapp.Lifecycle, conf *config.Config) { - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("bootstrap", GetEmbedFS()) return nil diff --git a/modules/dashboard/dashboard_app.go b/modules/dashboard/dashboard_app.go index 778ae73..d2b6697 100644 --- a/modules/dashboard/dashboard_app.go +++ b/modules/dashboard/dashboard_app.go @@ -14,13 +14,13 @@ import ( func Configure(l *goapp.Lifecycle, conf *config.Config) { - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("dashboard", GetEmbedFS()) return nil }) - l.Prepare(func(app *goapp.App) error { + l.Config(func(app *goapp.App) error { r := app.Get("gonode.router").(*router.Router) diff --git a/modules/feed/feed_app.go b/modules/feed/feed_app.go index d3ae04c..ab8a36a 100644 --- a/modules/feed/feed_app.go +++ b/modules/feed/feed_app.go @@ -27,7 +27,7 @@ func Configure(l *goapp.Lifecycle, conf *config.Config) { return nil }) - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("feed", GetEmbedFS()) return nil diff --git a/modules/prism/prism_app.go b/modules/prism/prism_app.go index b4cc7c9..1485780 100644 --- a/modules/prism/prism_app.go +++ b/modules/prism/prism_app.go @@ -289,7 +289,7 @@ func Configure(l *goapp.Lifecycle, conf *config.Config) { return nil }) - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("prism", GetEmbedFS()) return nil diff --git a/modules/search/search_app.go b/modules/search/search_app.go index ff6218f..e33ef03 100644 --- a/modules/search/search_app.go +++ b/modules/search/search_app.go @@ -42,7 +42,7 @@ func Configure(l *goapp.Lifecycle, conf *config.Config) { return nil }) - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("search", GetEmbedFS()) return nil diff --git a/modules/setup/setup_app.go b/modules/setup/setup_app.go index 990cb4e..a274bb2 100644 --- a/modules/setup/setup_app.go +++ b/modules/setup/setup_app.go @@ -184,7 +184,7 @@ func Configure(l *goapp.Lifecycle, conf *config.Config) { return nil }) - l.Prepare(func(app *goapp.App) error { + l.Register(func(app *goapp.App) error { app.Get("gonode.embeds").(*embed.Embeds).Add("setup", GetEmbedFS()) return nil diff --git a/test/test.go b/test/test.go index ac50524..e832129 100644 --- a/test/test.go +++ b/test/test.go @@ -115,8 +115,8 @@ func GetLifecycle(file string) *goapp.Lifecycle { }) base.Configure(l, conf) - form.Configure(l, conf) embed.Configure(l, conf) + form.Configure(l, conf) debug.Configure(l, conf) user.Configure(l, conf) raw.Configure(l, conf)