If that's what your application is - define the table in your model, and
add a smartgrid and you're done. It has crud (create, read, update, delete)
functionality builtin, and sane defaults.
a default smartgrid has 'add', 'query', sorting, paging, everything shown
in your screenshots.
It's so easy, I'll show you how to get started.
db.define_table('airports',
Field('airportCode'),
Field('description'),
Field('country'),
Field('embargo')
)
Add the above to your db.py in the models.
form = SQLFORM.smartgrid(db.airports)
return dict(message=T('Hello World'), form=form)
Make the last couple of lines in your "index" function of the "default"
controller like the above.
and add in {{=form}} to your view.
If you are not logged in, you won't see the "add" or "edit" buttons in the
grid.
On Thursday, June 14, 2012 6:58:22 AM UTC-7, KarlHeinzF wrote:
>
> Hallo everybody,
> first of all I am new to python and web2py.
> I am planning to re-develope some of my windows applications in python for
> the web.
> What is best to use, Web2py or Django or some other framework, that is my
> question.
>
> How can I re-develope them so they look and feel like the application in
> my attached screenshots?
>
> Books like „web2py Application Development Cookbook“ don’t realy help!
>
> What I need is a small application (source code that includes modules like
> MENUE, MASTER-DETAIL ENTRY, PRINTING etc.) that reduces my learning curve
> and gets me started fast.
>
> Any help is appreciated.
>
>
> regards
>
> Karl
>
>
> p.s. are there any german web2py developers that can help?
>