[web2py] sqlform.grid add new - populate some fields(with values from another db) based on other fields

2014-06-22 Thread Peter
Hi. Im new to web2py. I have gone through most of the ducumentation and videos but im still stuck. Here is the scenario: db : stockitems fields(itemcode, itemName, sellingPrice) db : sales fields(date,itemcode,itemname, sellingprice,qty,amount) I have a sqlform.grid from db.sales to

[web2py] how to install facebookpython sdk in web2py

2014-06-22 Thread greed
can please any one tell me how to install the facebook python sdk in web2py. -- 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 bec

[web2py] Re: sqlform.grid add new - populate some fields(with values from another db) based on other fields

2014-06-22 Thread 黄祥
> > 1. when i select itemcode from dropdown, the form to fill itemname and > sellingprice from the stockitems table > i think you can achieve it using form.validate(), use query for stockitems table and then insert itemname and sellingprice base on the row of stockitems > 2. when i enter qt

[web2py] Re: sqlform.grid add new - populate some fields(with values from another db) based on other fields

2014-06-22 Thread 黄祥
sorry, didn't read this sentence > > I want these to be reflected even before i click 'submit' button > > if you want to achieve it before click 'submit' button, i think you can achieve it using ajax callback for that. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: web2py password encryption/decryption

2014-06-22 Thread farmy zdrowia
I'm so sorry for late answer. I was out of office/home for a while. Busy time this 2014 I can see :). Anyway, Massimo is absolutely right. I have two joomla sites. One "Joomla _user original" and indeed passwords are according to standard described in link. Example (c563e965be1369f9030863daca

[web2py] Hypermedia API and Collection+JSON in web2py

2014-06-22 Thread Massimo Di Pierro
I added Hypermedia API support to web2py using Collection+JSON. Experimental. Collection+JSON is a standard for self documenting RESTful API. Read more: http://amundsen.com/media-types/collection/ Example = Let's say you have a model: db.define_table('thing',Field('name')) and in

Re: [web2py] Brainstorming

2014-06-22 Thread Limedrop
Have you looked at breezejs? A "JavaScript library that helps you manage data in rich client applications". Breeze dynamically builds a mirror of the server-side db model on the client and then binds to UI controls so the UI updates when the data model changes. Each object knows when it has ch

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-22 Thread Tomeu Roig
Thanks Brian, nice think to get a full href for pass to the $web2py.component. I see that you use datatables.net. Do you use some plugin o directly you pass json from controller? I want use in a new project but i have doubts have to implement. Can you give me some idea? -- Resources: - http:/

[web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-22 Thread samuel bonill
it's good, I use db.parse_as_rest for generate the representation of resources, Collection+JSON help much. other thing, I would like generate a resource with relationship for example patterns = [ ("posts/{post.id}", {"coments": {"author": "auth_user"}}] # My implementation parser

[web2py] Re: upgraded and lost + - in string:list

2014-06-22 Thread LoveWeb2py
Well... first of all my web2py.js only has 209 lines not 721.I am afraid to upgrade again because we had trouble with our last upgrade. In fact, I don't see any reference to the w2p_list in web2py.js Guess I should just try adding the code? On Saturday, June 21, 2014 2:51:31 PM UTC-4, Niphlod

[web2py] Re: upgraded and lost + - in string:list

2014-06-22 Thread LoveWeb2py
We're currently running 2.9.5 with Python 2.6 and our JS is only 209 lines. very odd. On Sunday, June 22, 2014 8:44:20 PM UTC-4, LoveWeb2py wrote: > > Well... first of all my web2py.js only has 209 lines not 721.I am afraid > to upgrade again because we had trouble with our last upgrade. In fact

[web2py] Re: upgraded and lost + - in string:list

2014-06-22 Thread LoveWeb2py
Issue resolved. Copied the web2py.js from the welcome app which had all the right lines. Very very weird! Thank you so much for your help, Niphlod. I didn't even think to check the git branch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-22 Thread Brian M
Tomeu, At the moment I'm just letting datatables.net enhance a plain html table for me. One of these days I'll probably get around to giving it a json datasource but so far it hasn't been a priority for my usage. As a bonus, here's some of how to update the datatables.net display after using t

[web2py] Re: tip of the day. The power of routes

2014-06-22 Thread Nguyen Minh Tuan
Hi Massimo, I think there is error in your script : CURRENT line 69 : ('.*:https?://(.*\.)?%s:$method /$anything' % domain, '%s/$anything' % path) should be : ('.*:https?://(.*\.)?%s:$method /%s/$anything' % (domain, app), '/%s/$anything' % app) Regards, Tuan On Monday, October 25, 2010 11:04

[web2py] Re: tip of the day. The power of routes

2014-06-22 Thread Massimo Di Pierro
Can you post the complete correct script? thanks. On Sunday, 17 October 2010 21:03:25 UTC-5, mdipierro wrote: > > Replace your web2py/routes.py with this: > > - begin routes.py--- > try: config=open('routes.conf','r').read() > except: config='' > def auto_in(apps): > r

[web2py] Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-22 Thread 98ujko9
Why readonly elements (select and date field) of a form respond to clicks and allow for changes and can be submitted? They look grayed out as if readonly but when I click on date field the date picker appears and works as it shoud also the select option is grayed out but it offers a list to cho

[web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-22 Thread Massimo Di Pierro
This is a automatic in Colleciton+JSON. For example: # assume a model that described things and their attributes db.define_table('thing',Field('name')) db.define_table('attr',Field('thing','reference thing'),Field('name')) and you expose both: def api(): from gluon.contrib.hypermedia import

[web2py] Re: how to install facebookpython sdk in web2py

2014-06-22 Thread Denis
Same thing. I cannot find any piece of documentation on how to get needed facebook module. Thank you in advance On Saturday, June 21, 2014 1:19:31 PM UTC+3, greed wrote: > > can please any one tell me how to install the facebook python sdk in > web2py. > -- Resources: - http://web2py.com - htt

[web2py] Re: web2py password encryption/decryption

2014-06-22 Thread farmy zdrowia
I did kind of investigation by myself. I can see CB uses new Joomla "Portable PHP password hashing framework" functionality to crypt password. I noticed CB run on joomla 3.2.1, while my other site is on Joomla 2 Anyway at the end of pasword cryption chain there is a function hashPassword and v

[web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-22 Thread Massimo Di Pierro
Let me add that Collection+JSON is a standard but that does not make it perfect. I find many limitations. I managed to overcome some but utilizing extensions. https://github.com/mamund/collection-json/tree/master/extensions I also made some of my own extensions. Extensions are allowed and compat

[web2py] Re: how to create an album and view photos belonging to that album

2014-06-22 Thread Rahul
Thanks! Dave, been using web2py since 2010 :) however not been active in coding from last few months.. (kinda lost touch) I'll get over it quickly though. Rahul On Sunday, June 22, 2014 12:09:10 AM UTC+5:30, Dave S wrote: > > > > On Friday, June 20, 2014 1:14:59 AM UTC-7, Rahul wrote: >> >> Hi