[web2py] Re: Unable to join more than one table in SQLForm.grid

2013-10-24 Thread Jayakumar Bellie
*Web2py version:* 2.5.1-stable+timestamp.2013.06.06.15.39.19 query = ((db.auth_group.id>0) & (db.auth_group.id==db.auth_membership.group_id) & (db.auth_user.id==db.auth_membership.user_id) & (auth.user.id==db.auth_user.id)) #return dict(table=query) displayFields = [db.auth_group.id

Re: [web2py] Re: 2 domains served by the same web2py

2013-10-24 Thread Paolo Valleri
I've this setup on a server: routers = dict( BASE = dict( default_application='vtraffic', default_controller='default', root_static = ['favicon.ico', 'robots.txt', 'google51a05a100c482cad.html', 'sitemap.xml'], domains = {'traffic.integreen-life.bz.it':'vtraffic', 'par

[web2py] Re: xmlrpc security

2013-10-24 Thread Massimo Di Pierro
I do not think xmlrpc can do this currently. Please share your code. On Thursday, 24 October 2013 17:40:50 UTC-5, kw...@teradactyl.com wrote: > > Hi All, > I am new to python and web2py and I really like them both! > > Can @xmlrpc provide client side certifcate validation and > actually do the hos

Re: [web2py] Re: form.custom usage

2013-10-24 Thread Anthony
Not quite clear what the problem is. What you put in the view shouldn't matter -- that just generates the HTML to display the widgets -- it doesn't have anything to do with validation (and form.custom.widget.fieldname will produce the same HTML as form.element(_name='fieldname')). Of course, you

Re: [web2py] Re: form.custom usage

2013-10-24 Thread Diogo Munaro
Here my controller and view: http://pastebin.com/AXGx99UN If I use form.custom.widget.first_name (for example). It's doesn't work. Another thing, if I insert: form2.element(_name="city_id")['_type']='hidden' after: if form2.process().accepted: It's returns a text field before the validation i

Re: [web2py] Re: web2py scheduler not working

2013-10-24 Thread Brian M
@ranjith, I think that you may be confusing the difference between Unix/Linux cron and the "cron" provided by web2py which are two different things. What @Marin is meaning is that you'

[web2py] Cannot add a NOT NULL column with default value NULL

2013-10-24 Thread Carlos Zenteno
What is wrong with the last line of my table? db.define_table('tenants_extra', Field('tenant', 'reference tenants'), Field('address', 'reference addresses'), Field('tenant_type', type = 'string', length = 32, default = T('Condominium'), required = True, label = T('Type'), comment = T(

[web2py] xmlrpc security

2013-10-24 Thread kwebb
Hi All, I am new to python and web2py and I really like them both! Can @xmlrpc provide client side certifcate validation and actually do the hostname checks on the certificates (to prevent MITM attacks) when an application is deployed on an apache server? I ask this because web2py turned me on to

[web2py] Re: def set_requirement problem

2013-10-24 Thread Niphlod
cut down the code to the point it doesn't fire an exception and start from there whenever you post something you seem to miss that we can't know all other table definitions (and variables) and for sure we can't do nothing to help you with this level of "implicitness" :-P On Thursday, Octobe

Re: [web2py] Re: 2 domains served by the same web2py

2013-10-24 Thread Loïc
Considering my previous post, and the routes documentation :http://www.web2py.com/books/default/chapter/29/04/the-core?search=routes#Routes-on-error Did you try to set up you routes.py file? Do you have a specific problems / error messages? Can you show us some code? -- Resources: - http://web

[web2py] Re: Unable to join more than one table in SQLForm.grid

2013-10-24 Thread Cliff Kachinske
What version of Web2py? Can you post your code? I've been using Web2py since v 1.8 and I've never seen the behavior you describe. On Thursday, October 24, 2013 8:51:38 AM UTC-4, Jayakumar Bellie wrote: > > I have tried that, it did not work. > > On Thursday, October 24, 2013 12:01:05 PM UTC+5:

[web2py] Re: display results from DB using the selected option by pulling

2013-10-24 Thread Cliff Kachinske
Two chapters in the online manual will answer your questions. - JQuery and Ajax - Components and plugins I usually go the JQuery/Ajax way, but I think the majority use LOAD to load a component. On Thursday, October 24, 2013 4:24:29 PM UTC-4, Vj wrote: > > Thanks Dave. > > Yes, I want to d

[web2py] Re: display results from DB using the selected option by pulling

2013-10-24 Thread Vj
Thanks Dave. Yes, I want to display the categories in the dropdown and based on the selected one, I get all the items from the DB based on the category to display. I did search for it, but I was not able to find anything relevant. Since this is in the same form and initially the results should

[web2py] Re: SQLForm issue with $("#dialog-form").load

2013-10-24 Thread Anthony
By default, the web2py "action" of the web2py form will be set to "#", which will simply post to the URL of the containing page. So, although the form will be created by your "edit" function, it will get posted to the function of the containing page, which will not doing anything with the poste

[web2py] Re: display results from DB using the selected option by pulling

2013-10-24 Thread Dave S
On Thursday, October 24, 2013 12:30:00 PM UTC-7, Vj wrote: > > All, > > I am trying to have a select (multi select drop down) option in the home > page and display the results on the home page itself(below the select box). > > I am able to pull the data from the Table 1 and display in the select b

Re: [web2py] Best way to learn web2py

2013-10-24 Thread Dave S
On Thursday, October 24, 2013 10:53:54 AM UTC-7, Derek wrote: > > Well, I don't particularly like that website. It's cluttered, disjointed. > > I think pointing people to the Web2Py Book (aka Documentation) is the way > to go. > > Well, it helps that the Web2Py book is quite thorough and well w

[web2py] display results from DB using the selected option by pulling

2013-10-24 Thread Vj
All, I am trying to have a select (multi select drop down) option in the home page and display the results on the home page itself(below the select box). I am able to pull the data from the Table 1 and display in the select box. I am not able to use the selected options to query Table 2 and dis

[web2py] Multiple login forms with ExtendedLoginForm example from book not working

2013-10-24 Thread Dragan Matic
I am trying to create Janrain login + web2py login with password so the users can choose login and registration method. When I try the following example from the book: from gluon.contrib.login_methods.rpx_account import RPXAccount from gluon.contrib.login_methods.extended_login_form import Exte

[web2py] Re: web2py DAL tables reference values not shown as drop downs

2013-10-24 Thread Massimo Di Pierro
Yes. The tables class_tbl and subject_bs need a format attribute (one each). On Thursday, 24 October 2013 09:49:57 UTC-5, ranjith wrote: > > Can that be done?? > > On Wednesday, 23 October 2013 22:29:50 UTC+5:30, ranjith wrote: >> >> Oh good. Thanks for the response. I added the format and it wor

[web2py] Re: SQLForm issue with $("#dialog-form").load

2013-10-24 Thread Dave S
On Tuesday, October 22, 2013 2:21:27 PM UTC-7, Sebastian Bonta wrote: > > Hi all, I'm having a issue with tha javascirpt load function. > I'm able to see the form but when I submit the changes they are not > reflected in the database. could you please help me to understand what am I > doing wro

Re: [web2py] websockets

2013-10-24 Thread bharath
Hii Ricardo, On Sunday, June 23, 2013 10:36:18 PM UTC+5:30, Ricardo Pedroso wrote: > > > On Fri, Jun 21, 2013 at 6:14 PM, shartha > > wrote: > >> Hi Ricardo, >> >> Thank you very much for posting the application. Here are a few questions >> that I have regarding this: >> 1. Do I need to put th

Re: [web2py] Best way to learn web2py

2013-10-24 Thread Derek
Well, I don't particularly like that website. It's cluttered, disjointed. I think pointing people to the Web2Py Book (aka Documentation) is the way to go. To quote PEP20: "There should be one and preferably only one obvious way to do it." The simple fact is that if you learn Web2Py some other

Re: [web2py] Best way to learn web2py

2013-10-24 Thread Richard Vézina
I think he want to create a similar Web site than the one for Ruby he posted. Richard On Wed, Oct 23, 2013 at 5:56 PM, Derek wrote: > You can certainly try something on your own, the best thing to do is read > the book. When people ask questions here, I usually refer them to the book, > aka th

[web2py] Re: Bootstrap's nav-collapse

2013-10-24 Thread Paolo Caruccio
In order to clarify my previous post if you replace the line 83 in layout.html with and remove inline css style from line 76, the nav will collapse normally also on desktop. Said that, in order to generate dinamically a menu I would do in this way (pseudo code to explain a conceptual idea):

[web2py] Re: Using dots on the URL. [routes.py] or [nginx]

2013-10-24 Thread Albert Abril
Mm.. nginx with uwgsi looks like is receiving it allright: [pid: 924|app: 0|req: 1542/3269] 95.21.110.xxx () {46 vars in 1179 bytes} [Thu Oct 24 15:35:01 2013] GET /profile/albert.abril => generated 50 bytes in 0 msecs (HTTP/1.1 400)3 headers in 116 bytes (1 switches on core 0) So I guess I shoul

[web2py] Using dots on the URL. [routes.py] or [nginx]

2013-10-24 Thread Albert Abril
Hi everyone, I'm missing some concepts with URLs, so, I don't know exactly the way I need to resolve this problem. I have this scenario: - nginx - web2py On my web2py application, I have two users: albert and albert.abril First URL is working ok, second not: 1. http://localhost/profile/albert 2

[web2py] def set_requirement problem

2013-10-24 Thread Annet
I have the following table definition def set_requirement(hero): hero.categoryID.requires=[IS_IN_DB(db, 'interfaceCategory.id', '%(name)s', orderby='interfaceCategory.id', zero='Selecteer een interface', error_message='Selecteer een interface'), IS_NOT_IN_DB(db(db.hero.categoryID==request.vars.

[web2py] Re: web2py DAL tables reference values not shown as drop downs

2013-10-24 Thread ranjith
Can that be done?? On Wednesday, 23 October 2013 22:29:50 UTC+5:30, ranjith wrote: > > Oh good. Thanks for the response. I added the format and it worked. > > But, here I have one problem. In the table(subject_class) I am only having > a combination of two foreign keys and no other columns. So, a

[web2py] Re: Bootstrap's nav-collapse

2013-10-24 Thread Annet
Hi Paolo, Thanks for you reply. At the moment I am not using Web2py's menu helper. My menu's are retrieved from a database and I have been struggling to get them into the right structure: I have a table nav which contains all menu items and a table nodenav which combines nodes with navs, when

[web2py] Re: Bootstrap's nav-collapse

2013-10-24 Thread Paolo Caruccio
If you are using the layout.html that comes with web2py, please pay attention that the normal collapsing behaviour of bootstrap is bypassed: the collapsed menu is only on mobile devices not on PC. So, if it's the case, please check https://github.com/web2py/web2py/blob/master/applications/welco

[web2py] Re: Unable to join more than one table in SQLForm.grid

2013-10-24 Thread Jayakumar Bellie
I have tried that, it did not work. On Thursday, October 24, 2013 12:01:05 PM UTC+5:30, Niphlod wrote: > > use the field_id argument to tell the grid what id should use to generate > the links. > > On Thursday, October 24, 2013 7:39:02 AM UTC+2, Jayakumar Bellie wrote: >> >> That does not work. >

[web2py] Re: Bootstrap's nav-collapse

2013-10-24 Thread Annet
Thanks for your reply. What exactly is the problem? Does the downloaded bootstrap behave > differently than you expect it to? > In the views with a maximum width of 658px and 760px I added this to the layout extending the outer layout. {{if width:}} .container {max-width: 760px;} {{else

[web2py] Re: LOAD e form.custom na view...

2013-10-24 Thread Anthony
Please show your code. On Thursday, October 24, 2013 7:55:51 AM UTC-4, Meir wrote: > > Hello! > > I have the following questions: > > I have a function(Def) that generates a FORM in my controller that invoke > the view through the LOAD function. > But the view I used "form.custom", but the FORM L

[web2py] LOAD e form.custom na view...

2013-10-24 Thread Meir
Hello! I have the following questions: I have a function(Def) that generates a FORM in my controller that invoke the view through the LOAD function. But the view I used "form.custom", but the FORM LOAD brings in pure form generated by web2py ... I was clear in doubt? In short: I need the LOAD

[web2py] Re: Bootstrap's nav-collapse

2013-10-24 Thread LightDot
What exactly is the problem? Does the downloaded bootstrap behave differently than you expect it to? The bootstrap-responsive.min.css file is missing simply because the customized version includes everything in the basic .css file, it's not an error. Regards On Thursday, October 24, 2013 10:5

Re: [web2py] Re: 2 domains served by the same web2py

2013-10-24 Thread António Ramos
I have now these apps apps.cires.pt/app1 apps.cires.pt/app2 www.cires.pt www.previnil.pt how do i write my routes.py for these apps? 2013/10/24 Loïc > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] Re: 2 domains served by the same web2py

2013-10-24 Thread Loïc
Did you try using routes.py? Something like # -*- coding: utf-8 -*- routes_app = ( (r'.*?:https?://www.site1.pt:\w* /$anything', r'site1'), (r'.*?:https?://www.site2.pt:\w* /$anything', r'site2') ) Le jeudi 24 octobre 2013 11:12:07 UTC+2, Ramos a écrit : > > hello, i need another domai

[web2py] 2 domains served by the same web2py

2013-10-24 Thread António Ramos
hello, i need another domain served by my web2py in windows 7 I have www.site1.pt served my web2py server , no i need another www.site2.pt served also by my web2py server I have my firewall setup and my dns to point to my web2py but how do i setup web2py to serve 2 domains? Thank you -- Reso

[web2py] Bootstrap's nav-collapse

2013-10-24 Thread Annet
In part of my application's views (width: 658px and width: 760px) I want the bootstrap navbar to be always collapsed. First thing I did is download a customized copy of Bootstrap: http://getbootstrap.com/2.3.2/customize.html with @navbarCollapseWidth set to 768, however, the zip file does not i

[web2py] Re: new feature in trunk

2013-10-24 Thread Arnon Marcus
How would this work internally? What queries would be generated? How many queries would be generated? At what points in time would queries be "executed"? Would that be a "lazy" execution? We have many such tables in our project, so this is a big interest of ours to have this work as best it can.

Re: [web2py] Re: web2py scheduler not working

2013-10-24 Thread Marin Pranjić
Why can't you add that line in cron? I don't get it. Scheduler WILL be running if you do it, you just need a full path to web2py.py. Did you even try? What wasn't working? Anyway there is another way to start scheduler in background: http://web2py.com/books/default/chapter/29/13/deployment-recipes