Summary
A fresh smpy new myapp --yes includes a sample hello module under modules/hello/. Every boot logs:
⚠ SM019 [WARNING] Hello: Module 'Hello' registers view routes (view_prefix='/hello') but no menu items or permissions
↳ Suggestion: Override register_menu_items() to surface this module in the sidebar, register_permissions() to surface it in the role editor, or clear view_prefix if it's API-only
Results: 0 error(s), 1 warning(s), 0 info
…and confirming this, GET /hello returns 404 because no view is wired up — only /api/hello/ works.
A user's first boot of their scaffold shouldn't produce diagnostic warnings. It teaches the wrong lesson: "warnings are normal noise, ignore them."
Suggested fix (pick one)
- Sample module should be self-consistent. Either drop
view_prefix='/hello' from the template (it becomes an API-only sample), or add a minimal register_menu_items + a stub pages/Browse.tsx so /hello actually renders.
- Tighten the template's defaults.
hello/module.py should ship without view_prefix and let smpy create-module add it when the user opts in.
(1.a) — drop view_prefix — is the smallest change.
Summary
A fresh
smpy new myapp --yesincludes a samplehellomodule undermodules/hello/. Every boot logs:…and confirming this,
GET /helloreturns 404 because no view is wired up — only/api/hello/works.A user's first boot of their scaffold shouldn't produce diagnostic warnings. It teaches the wrong lesson: "warnings are normal noise, ignore them."
Suggested fix (pick one)
view_prefix='/hello'from the template (it becomes an API-only sample), or add a minimalregister_menu_items+ a stubpages/Browse.tsxso/helloactually renders.hello/module.pyshould ship withoutview_prefixand letsmpy create-moduleadd it when the user opts in.(1.a) — drop
view_prefix— is the smallest change.