[luci] Again about names, howto writing modules and some other questions
Arconas
arconas at gmail.com
Thu Nov 10 10:34:11 CET 2011
Hello everyone.
I have a problem with writing the test module.
Following the instructions I create directory "controller" and subdirectory
"myapp" in applications/myapplication/lucisrc/
After that create a simple file mymodule.lua (as well as in the instruction)
and write simple code:
"module("luci.controller.myapp.mymodule", package.seeall)
function index()
entry({"click", "here", "now"}, call("action_tryme"), "Click here",
10).dependent=false
end
function action_tryme()
luci.http.prepare_content("text/plain")
luci.http.write("Hello World T_T")
end"
make runhttpd.... waiting some time and go to *
http://localhost:8080/luci/click/here/now
Error message -
No page registered at 'click/here/now'
I was trying clear index file in tmp dir, make clean && make runhttpd
MODULE='applications/myapplication'. *But the result is the same.
How to make the controller code work and show simple page?
And another question.
Suppose there is a need to slightly change admin page. Remove unnecessary menu
items or add a special section for our device. Where are the necessary
controllers, models and viewers ? I tried and still trying to sort out how the
system works, but it's more like shooting blindly.
P.S Sorry for bad english =(
* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsignal.org/pipermail/luci/attachments/20111110/c02fb94c/attachment.html>
More information about the luci
mailing list