[web2py] Re: HTML table inside component won't render

2012-01-10 Thread Cahya Dewanta
Ah silly me. Developer tools should be my friend :) now I can see that my table inherit style from skeleton.css which set 'border: 0 none'. Thank you for pointing it out, Anthony!

[web2py] HTML table inside component won't render

2012-01-10 Thread Cahya Dewanta
Hello. I create a simple component (a .load file) with a table in it. If I call it directly via browser then it would render as expected. But calling it from within a view (with LOAD method) won't render its format (border, spacing, etc). I notice that it only happens with table. Others just render

[web2py] Re: Shortcut for fetching a row

2011-11-18 Thread Cahya Dewanta
DenesL, That works and just what I need. Thank you! Anthony, I did think that the first argument is the field to return :) Thank you for the clear explanation. Khalil, Thanks for the tips. I'd consider that for my projects.

[web2py] Shortcut for fetching a row

2011-11-18 Thread Cahya Dewanta
According to the book, for what I understand record = db(db.owner.name=='test').select(db.owner.id).first() could be shortcut with record = db.owner(id, name='test') But the latter return None. How can I shortcut the first statement properly? Thank you so very much.

[web2py] Re: Recursive select up to 2 levels

2011-11-17 Thread Cahya Dewanta
Thank you, Cliff. Now it's clear how to do recursive select to whatever level :)

[web2py] Re: Recursive select up to 2 levels

2011-11-17 Thread Cahya Dewanta
Thank you, DenesL!

[web2py] Recursive select up to 2 levels

2011-11-16 Thread Cahya Dewanta
Hello. Here's how I define my models: db.define_table('owner', Field('name'), format='%(name)s') db.define_table('retail', Field('owner_id', db.owner), Field('name'), format='%(name)s') db.define_table('administer', Field('retail_id', db.retail), Field('name')) How can I select all administers be

[web2py] Re: Using "auth.settings.login_onaccept"

2011-11-11 Thread Cahya Dewanta
1. in your db.py you should define def go_log(object): redirect(URL('default','samples')) #default is the controller, samples is the action. auth.settings.login_onaccept = go_log 2. in your default.py create a action def samples(): return dict() 3. you should have created file samples

[web2py] Re: CAS auto login for all apps

2011-11-11 Thread Cahya Dewanta
pepper_bg. You mean @auth.requires_login() ? Cos it works and you are 100% right about what I'm trying to describe :) Thanks! Anthony. Thanks again. It seems separating databases and using CAS is the most suitable for my system.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Anthony. Just tried and indeed it works. Can I combine it with pepper_bg's tips so I get the same behaviour? Once login will autologin all apps if we visit them. I still need to click login button right now.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
pepper_bg. I just realize like you mentioned before that I don't need CAS since I'm sharing the database. Once I set session.connect(request, response, db, masterapp='app3') it works! It even autologin to all apps once I login. No clicking login button. Once logout will logout all apps too. Somethi

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Thank you. I'll get your directions and will post the result to inform.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
And that's why I'm sharing the database connection. In my understanding, one registration is one database. I prefix the tables to know what tables belongs to what apps.

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
pepper_bg, my project is exactly the same with your samples above except I'm using MySQL. I have 3 apps and one registration should be enough to access those all apps. I try to avoid different registrations and different logins. One login, one username for all. What approach should I do then?

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Hello Anthony. I begin to think that I do the wrong approach for my system. In my understanding, 3 different databases would make 3 different user registrations. Is it?

[web2py] Re: CAS auto login for all apps

2011-11-09 Thread Cahya Dewanta
Thank you :) 'CAS is working properly' by my little understanding is I'm able to login to each app with one single id, though I have to manually provide credentials data once again to each app. I've followed your sample and it works. Then I change the adapter to MySQL. Setting up all DAL to refer

[web2py] CAS auto login for all apps

2011-11-08 Thread Cahya Dewanta
This is my 7th day using web2py. I have my CAS working properly. But I have to manually login with same username to each app. Is this normal? How to make it automatically once login for all? All apps are on the same domain. Actually I haven't set anything or change any code. The new web2py did it f