Commit 3c21e7b
fix: correct bugs and gaps in database setup chapter (#10)
* docs: expand views, auth & sessions chapter with template basics, CSRF, and simplified login flow
- Add ErlyDTL syntax reference table, base layout with template inheritance
- Add CSRF token to login form (required by nova_csrf_plugin)
- Document all template options (view, headers, status_code)
- Move credential validation from security function into controller
- Simplify session_auth to return {redirect, "/login"} instead of bare false
- Remove manual session ID generation — use Nova's auto-created sessions
- Consolidate routes from three groups to two (public + protected)
- Add use_sessions config, session API return types, and delete/1 cookie behavior
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: correct bugs and gaps in database setup chapter
Cross-referenced against Kura and rebar3_kura source to fix:
- config/0 now matches generator output (application:get_env for database,
<<"postgres">> password, ?MODULE pool)
- Clarify kura_repo behaviour only requires config/0 callback
- Rewrite "Configuring the repo" to explain env-specific overrides
- Add kura_migrator:migrate/1 call in supervisor startup
- Fix provider hook from {post,...} to {pre,...}
- Fix query example to show actual return format ({ok, [#{...}]})
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent d64a39d commit 3c21e7b
1 file changed
+24
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| 151 | + | |
| 152 | + | |
145 | 153 | | |
146 | 154 | | |
147 | 155 | | |
| |||
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
| 169 | + | |
161 | 170 | | |
162 | 171 | | |
163 | 172 | | |
164 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
165 | 178 | | |
166 | 179 | | |
167 | 180 | | |
168 | 181 | | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
172 | | - | |
| 185 | + | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
176 | | - | |
| 189 | + | |
177 | 190 | | |
178 | 191 | | |
179 | 192 | | |
| |||
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
189 | | - | |
190 | | - | |
| 202 | + | |
| 203 | + | |
191 | 204 | | |
192 | 205 | | |
193 | | - | |
| 206 | + | |
194 | 207 | | |
195 | 208 | | |
196 | 209 | | |
| |||
0 commit comments