This is not so much complex if you split it into 2 steps.

1) Be familiar with the welcome/ application - this is scaffold application 
in standard web2py distribution.

- Models are called always and create db (database object and sql database 
structures) + auth (authorization object) + menu.
- Controller is called based on url, example: app/default/index will call 
function index() in app/controllers/default.py
- If controller will return dictionary {'key1': val1, 'key2': val2, ...} it 
is rendered on the server side with template (=view) like 
app/views/default/index.html
  {{=key1}} will output variable from controller somewhere into html.

app/controllers/default.py func user() + app/views/default/user.html is for 
authorizetion, login,..
app/controllers/appadmin is for view and manage database data (you can use 
some standard database manager instead)

2) Now you can see that in github.com/web2py/scaffold is almost nothing 
added. Just client side (javascript from static/js/) is made with vue.js.

So you should understand just this 1 
file: https://github.com/web2py/scaffold/blob/master/static/js/main-vue.js
+ see the controller main() in default.py (it gives no data at all to the 
template) and the template app/views/default/main.html

In html:
{{=....}} are included on server side by web2py
${...} are for client side, vue.js

--------------
Of course you can
- remove full text search whoosh to make things easier
- replace stupid.css with your own css or with bootstrap
- replace vue.js with react or something easier: preact or inferno





Dne středa 9. srpna 2017 4:24:18 UTC+2 黄祥 napsal(a):
>
> thanks for reference anthony, already seen and learned from web2py 
> scaffold (vue + whoosh) but for me, it's complex
> i want to learn it start from simple first, perhaps there is another 
> simple web2py app with whatever js framework (1 table with 1 field that 
> have CRUD operation or GRID is enough to know web2py job's part and js 
> framework jobs part)
>
> thanks and best regards,
> stifan
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to