@@ -3,10 +3,10 @@ defmodule BitstylesPhoenixDemoWeb do
33
44 def controller do
55 quote do
6- use Phoenix.Controller , namespace: BitstylesPhoenixDemoWeb
6+ use Phoenix.Controller , formats: [ :html ]
77
88 import Plug.Conn
9- import BitstylesPhoenixDemoWeb.Gettext
9+ use Gettext , backend: BitstylesPhoenixDemoWeb.Gettext
1010 alias BitstylesPhoenixDemoWeb.Router.Helpers , as: Routes
1111 end
1212 end
@@ -15,11 +15,12 @@ defmodule BitstylesPhoenixDemoWeb do
1515 quote do
1616 use Phoenix.View ,
1717 root: "lib/bitstyles_phoenix_demo_web/templates" ,
18- namespace: BitstylesPhoenixDemoWeb
18+ namespace: BitstylesPhoenixDemoWeb ,
19+ pattern: "**/*"
1920
2021 # Import convenience functions from controllers
2122 import Phoenix.Controller ,
22- only: [ get_flash: 1 , get_flash: 2 , view_module: 1 , view_template: 1 ]
23+ only: [ get_csrf_token: 0 , get_flash: 1 , get_flash: 2 , view_module: 1 , view_template: 1 ]
2324
2425 use BitstylesPhoenix.Alpine3
2526
@@ -62,24 +63,24 @@ defmodule BitstylesPhoenixDemoWeb do
6263 def channel do
6364 quote do
6465 use Phoenix.Channel
65- import BitstylesPhoenixDemoWeb.Gettext
66+ use Gettext , backend: BitstylesPhoenixDemoWeb.Gettext
6667 end
6768 end
6869
6970 defp view_helpers do
7071 quote do
72+ # Import basic rendering functionality (render, render_layout, etc)
73+ import Phoenix.View
74+ import Phoenix.Component
7175 # Use all HTML functionality (forms, tags, etc)
72- use Phoenix.HTML
76+ import Phoenix.HTML
77+ import Phoenix.HTML.Form
7378
7479 use BitstylesPhoenix
7580 # Import LiveView and .heex helpers (live_render, live_patch, <.form>, etc)
76- import Phoenix.Component
77-
78- # Import basic rendering functionality (render, render_layout, etc)
79- import Phoenix.View
8081
8182 import BitstylesPhoenixDemoWeb.ErrorHelpers
82- import BitstylesPhoenixDemoWeb.Gettext
83+ use Gettext , backend: BitstylesPhoenixDemoWeb.Gettext
8384 alias BitstylesPhoenixDemoWeb.Router.Helpers , as: Routes
8485 end
8586 end
0 commit comments