[web2py] Re: force mobilize

2014-06-16 Thread HarryE
Put request.user_agent().is_mobile=True in db.py marți, 21 februarie 2012, 13:12:20 UTC, Scott Benninghoff a scris: I was wondering if there is a way to set a global variable that would force a site to present in mobile mode. Thanks for the help. -- Resources: - http://web2py.com -

Re: [web2py] Re: Brainstorming

2014-06-16 Thread António Ramos
Massimo, can you post a ractive example where you had problems doing it with angular? Whe should go to examples to understand this angular/ractive issue better 2014-06-16 4:31 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: I have used Angular for a project and it was a nightmare. I

[web2py] Apache virtual hosts http and https correct WSGI setup?

2014-06-16 Thread David Zejda
Hello :) I am experiencing an issue when I try to log-in through http, then through https behind Apache using WSGI. Web2py Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 Python 2.7.3: /usr/bin/python (prefix: /usr) Traceback (most recent call last): File /opt/web2py/gluon/main.py, line

[web2py] Re: web2py IronPython status

2014-06-16 Thread Richard
Hi, Why would you have IronPython support for Web2py? I am planning a web2py app within a .NET applications landscape and will create .NET classes for communication with the other applications. These classes will are accessible by the web2py server. I'll call it best of both worlds. Richard.

[web2py] How do I view text on view.html

2014-06-16 Thread Maurice Waka
My code: class Person(): name = 'Victor' def say(self, what): print(self.name, what) getattr(person, attr_name) How do I display 'Victor' on web2py html.view? I tried using: {{=getattr(person, attr_name)}} I know this could be wrong and I cant get a result either

[web2py] apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start

2014-06-16 Thread Tim Richardson
I've moved a client's web2py apps to a new windows server. It's now 2008 R2 (on a 2012 hypervisor). I'm still using Apache 2.4 (although a slightly later version). I get constant and very high CPU usage (1 of 8 cores showing 10% or 11% CPU) as soon as the Apache service starts. This server only

Re: [web2py] How do I view text on view.html

2014-06-16 Thread Carlos Costa
You should create and action for that view and pass it in dictionary to the view 2014-06-16 7:08 GMT-03:00 Maurice Waka mauricew...@gmail.com: My code: class Person(): name = 'Victor' def say(self, what): print(self.name, what) getattr(person, attr_name) How do

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

2014-06-16 Thread Carlos Costa
It may work if this button is inside the component loaded. 2014-06-13 20:47 GMT-03:00 Omri Levy my.mail...@gmail.com: Hi , So I have a ticket system, and I want to allow user to edit the ticket without leaving the page. I don't want to LOAD the edit_page and hide it, but only load it once

[web2py] Re: apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start

2014-06-16 Thread Niphlod
why apache and not iis ? On Monday, June 16, 2014 12:59:24 PM UTC+2, Tim Richardson wrote: I've moved a client's web2py apps to a new windows server. It's now 2008 R2 (on a 2012 hypervisor). I'm still using Apache 2.4 (although a slightly later version). I get constant and very high CPU

Re: [web2py] How do I view text on view.html

2014-06-16 Thread Maurice Waka
@ Carlo, that's where am stuck On Mon, Jun 16, 2014 at 2:36 PM, Carlos Costa yamandu.co...@gmail.com wrote: You should create and action for that view and pass it in dictionary to the view 2014-06-16 7:08 GMT-03:00 Maurice Waka mauricew...@gmail.com: My code: class Person():

[web2py] Re: How do I view text on view.html

2014-06-16 Thread Anthony
This doesn't look anything like typical web2py code. I would recommend that you read some of the book and follow the typical patterns and then come back with questions if you're having trouble. In general, though, note that you won't be using the print statement to display anything in HTML

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

2014-06-16 Thread Anthony
If you want to dynamically add a component in the browser, you cannot use the LOAD helper, which is a Python helper that is serialized on the server. Instead, use the $.web2py.component() Javascript function. Something like: input type=button value=Edit onclick=$.web2py.component('{{=URL('

[web2py] Re: Brainstorming

2014-06-16 Thread JorgeH
I have tried both Angular and Ractive. I choose Ractive every time. On Sunday, June 15, 2014 3:34:25 AM UTC-5, Massimo Di Pierro wrote: Often Angular comes up on this list. I tried it and I was un-impressed. Instead today my favorite client-side stack is based on these: - jquery.js -

[web2py] Why does this happen: DAL returns a tuple is it supposed to?

2014-06-16 Thread Cliff Kachinske
Why is DAL returning a tuple here? from dal import DAL db = DAL('postgres://web2pyuser:password@localhost:5432/webtest', fake_migrate_all=True) q = '''select coalesce(sum(amount), 0) from product_journal''' db.executesql(q) [(Decimal('250.000'),)] # Why is the returned value a tuple? This

[web2py] Re: Why does this happen: DAL returns a tuple is it supposed to?

2014-06-16 Thread Leonel Câmara
That's just a consequence of python's DB-API (see http://legacy.python.org/dev/peps/pep-0249/ ) the result is indeed supposed to be a list of tuples. However web2py's DAL executesql does have many parameters that allow you to change the results, you can even get Rows if you want. I recommend

[web2py] Possible to use IS_IN_SET with no db? Just need simple drop down

2014-06-16 Thread LoveWeb2py
I have a form I'm using and I just want a user to be able to select the max amount of queries from a pre-selected set, but the dropdown isn't working (I'm sure its because of my code) Here is what I have: form = FORM('Choose dates', INPUT(_name=date1, _class=datetime',

[web2py] Re: How do I view text on view.html

2014-06-16 Thread LoveWeb2py
On Monday, June 16, 2014 6:08:55 AM UTC-4, Maurice Waka wrote: My code: class Person(): name = 'Victor' def say(self, what): print(self.name, what) getattr(person, attr_name) How do I display 'Victor' on web2py html.view? I tried using: {{=getattr(person,

[web2py] Re: How do I view text on view.html

2014-06-16 Thread LoveWeb2py
If you want to get 'Victor' in a view you could do something simple like: Controller: def name_return(): name = 'Victor' return dict(name=name) view name_return.html: {{extend 'layout.html'}} {{=name}} -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] appadmin is disabled because insecure channel using default ipv6 local ::1 on windows with w2p 2.95

2014-06-16 Thread Greg Vaughan
Heading says it all... no problems using localhost IPv4... Is this expected behaviour? Seems rather strange if so... -- 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

[web2py] Re: Possible to use IS_IN_SET with no db? Just need simple drop down

2014-06-16 Thread LoveWeb2py
I got it. Sorry I just learned about the SELECT statement. SELECT(*[TR(TD(item)) for item in [1,5,10]], _name=query_limit, _type='list:integer'), Hope this helps someone. On Monday, June 16, 2014 11:22:50 AM UTC-4, LoveWeb2py wrote: I have a form I'm using and I just want a user to be able

Re: [web2py] Re: How do I view text on view.html

2014-06-16 Thread Carlos Costa
I guess you need to familiarize yourself more with not just with web2py but also with web development, right? Anthony is right, you should read web2py book at www.web2py.com/book, at least the first chapters to get a start. At first you need to understand MVC. For example you may have: in db.py

[web2py] Re: Why does this happen: DAL returns a tuple is it supposed to?

2014-06-16 Thread Cliff Kachinske
Leonel, Ah, so it is. Thank you. On Monday, June 16, 2014 10:31:53 AM UTC-4, Leonel Câmara wrote: That's just a consequence of python's DB-API (see http://legacy.python.org/dev/peps/pep-0249/ ) the result is indeed supposed to be a list of tuples. However, web2py's DAL executesql does

[web2py] Re: Brainstorming

2014-06-16 Thread Derek
I prefer jqote2 and jquery pesonally. It's one of the fastest out there and the templates are pretty simple yet flexible. On Sunday, June 15, 2014 1:34:25 AM UTC-7, Massimo Di Pierro wrote: Often Angular comes up on this list. I tried it and I was un-impressed. Instead today my favorite

[web2py] Re: web2py IronPython status

2014-06-16 Thread Derek
Test it out. I believe you'll be pleasantly surprised at what does work. Not everything does work, but for a while, IronPython didn't have access to the CSV library built into CPython so it couldn't even do logging. Now that it does have that, more should work. Give it a shot and report back

[web2py] Re: Possible to use IS_IN_SET with no db? Just need simple drop down

2014-06-16 Thread Niphlod
ehmmm. a TD inside a TR inside a SELECT ? and for a list:integer ? It sums ups to all kind of wrongs. You're messing widgets with Fields. why don't you just use SQLFORM.factory ? (or, if you know your html. pleease use SELECT((1,5,10), )) On Monday, June 16, 2014 5:41:22 PM

[web2py] Re: Possible to use IS_IN_SET with no db? Just need simple drop down

2014-06-16 Thread LoveWeb2py
Hi Niphlod, I actually got the information from the web2py cheatsheet. I have removed the TR/TD and the list:integer http://web2py.com/examples/static/web2py_cheatsheet.pdf On Monday, June 16, 2014 2:38:03 PM UTC-4, Niphlod wrote: ehmmm. a TD inside a TR inside a SELECT ? and for a

[web2py] Re: Possible to use IS_IN_SET with no db? Just need simple drop down

2014-06-16 Thread LoveWeb2py
Your method is exactly what I was looking for SELECT((1,5,10), ...)) Thank you! I knew there was an easier way :) On Monday, June 16, 2014 2:38:03 PM UTC-4, Niphlod wrote: ehmmm. a TD inside a TR inside a SELECT ? and for a list:integer ? It sums ups to all kind of wrongs. You're messing

[web2py] Which pure python DB or BTree (like ZODB) is best to modify the Scheduler to use pure-python code?

2014-06-16 Thread dlypka
I am interested to deploy the Scheduler in gluon in a non web app, separate from the web2py web scaffolding, in pure python environments which may not have any SQL database installed or accessible.SQLite needs a platform-dependent installer so is unsuitable. Does the DAL have any support for a

[web2py] Re: apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start

2014-06-16 Thread Tim Richardson
why apache and not iis ? Familiarity ... I have never used iis and there is no deployment recipe in the book. For sure my Apache is not set up correctly or there is a bug somewhere. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py