[web2py] Re: cross-platform apps

2011-11-26 Thread Anthony
On the server side, request.user_agent() returns info about the user agent, and request.user_agent().is_mobile indicates whether it's a mobile device. You can also decorate a function with @mobilize, and when it's a mobile client, it will automatically change the view from func.html to func.mob

Re: [web2py] Re: Introducing Web2py Powered Pastebin

2011-11-26 Thread qasimak...@gmail.com
Nice one... On Sun, Nov 27, 2011 at 5:29 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > :-) > > On Nov 26, 5:39 pm, Farsheed Ashouri > wrote: > > You can also give others direct download links. > > > > example: *Get This Code * >

[web2py] cross-platform apps

2011-11-26 Thread VP
Hi, I know web2py has a seemingly very useful plugin for jquery mobile. I am wondering what everyone does for apps that are supposed to be tailored for both PCs and mobile devices. At the simplest level, let's say there are two layouts that need to be switched depending on which platforms. How d

[web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread elffikk
and also uwsgi --version doesn't give the version but tells that there is an error

[web2py] Re: ImportError with AppEngine SDK v1.6.0

2011-11-26 Thread howesc
i don't know my python innards well enough to fully follow all the ways that you can mess with imports, but i suspect that this file: http://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/tools/dev_appserver_import_hook.py which specifies a hook that is passed as

[web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread elffikk
with the latest uwsgi version I cannot login to my website, even no error is generated I use also a flex app with web2py service and it gives an error Traceback (most recent call last): File "/home/yourname/web2py/gluon/restricted.py", line 194, in restricted exec ccode in environment File

[web2py] Re: Introducing Web2py Powered Pastebin

2011-11-26 Thread Massimo Di Pierro
:-) On Nov 26, 5:39 pm, Farsheed Ashouri wrote: > You can also give others direct download links. > > example: *Get This Code *

[web2py] Re: Datepicker not showing up for simple input field

2011-11-26 Thread Anthony
If you're using the AnyTime date/time picker (which currently comes with web2py), then your element must have a unique 'id' attribute (even though web2py doesn't use the 'id' to attach AnyTime). This is mentioned near the bottom of http://www.ama3.com/anytime/, in the "Behavior Issues" section

[web2py] Datepicker not showing up for simple input field

2011-11-26 Thread Roger Baker
Hello, I know I am probably overlooking something really obvious, but I can't get the datepicker to show up for a simple search field. The search seems to work ok, but I have to manually enter the date. my controller function is: **

[web2py] Introducing Web2py Powered Pastebin

2011-11-26 Thread Farsheed Ashouri
Hi everyone, I want to introduce you my Web2py based Pastebin. Ourway Pastebin Here are some screenshots:

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Massimo Di Pierro
oops. right def update_mytable(): record=request.args[0] form=SQLFORM(db.timbrata, record, deletable=False) form.process(onsuccess=lambda form: ( \ auth.archive(form), form.record_id and db(db.mytable.id==form.record_id).update(field2='optio

[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread dlypka
Thanks - I had not noticed that fact hidden underneath the ASP.NET controls all these years. On Nov 26, 3:31 pm, Anthony wrote: > More generally, if you give all the radio elements the same value > for the 'name' attribute, the browser will allow only one to be selected at > a time. > > Anthony

[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Anthony
More generally, if you give all the radio elements the same value for the 'name' attribute, the browser will allow only one to be selected at a time. Anthony On Saturday, November 26, 2011 4:25:54 PM UTC-5, Anthony wrote: > > Have you tried the radio widget -- SQLFORM.widgets.radio.widget (see

[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Matt Gorecki
All of the input tags need to have the same name value. Milk Butter Cheese Matt

[web2py] Re: How to cause radio buttons to auto deselect?

2011-11-26 Thread Anthony
Have you tried the radio widget -- SQLFORM.widgets.radio.widget (see http://web2py.com/book/default/chapter/07#Widgets). Anthony On Saturday, November 26, 2011 4:00:06 PM UTC-5, dlypka wrote: > > When I create several radio buttons in a web2py form, they do not auto > deselect when another is se

Re: [web2py] How to cause radio buttons to auto deselect?

2011-11-26 Thread chandrakant kumar
I think you should group them together, as per common sense, i don't know how to do it. On Sun, Nov 27, 2011 at 2:30 AM, dlypka wrote: > When I create several radio buttons in a web2py form, they do not auto > deselect when another is selected. They all stay selected. Do I need > to add my own

[web2py] How to cause radio buttons to auto deselect?

2011-11-26 Thread dlypka
When I create several radio buttons in a web2py form, they do not auto deselect when another is selected. They all stay selected. Do I need to add my own javascript code to do the auto deselect (so that only one radio button at a time stays selected) or does web2py have some support for this behav

[web2py] Re: Google Authentication on GAE

2011-11-26 Thread amit
Thanks howesc. Finally I was able to fix the issue, as the welcome app was working. The problem was that login silently fails when the following code is present: test_db = DAL('gae://test') I don't know why it fails. On Nov 26, 9:26 am, howesc wrote: > if you want to use google authentication

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Vasile Ermicioi
a question to Roberto I don't see --async parameter in this command uwsgi --http-socket 127.0.0.1:port --pythonpath /user/web2py --module wsgihandler -d /user/uwsgi.log -t 20 -r --no-orphans -M -p 1--touch-reload /user/uwsgireload.txt --evil-reload-on-rss 64 how does it work? does it spawns gree

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Vasile Ermicioi
your 2 cents are misguided I said that before - web2py is a great framework - webfaction is a great hosting but have memory constraints !!! *uwsgi *makes it possible to use them together !!! yes, I got memory problems when I installed apache+mod_wsgi, I tried there many servers/modes: nginx+u

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Anthony
If using form.process(), I think the arg would be 'onsuccess', not 'onaccept'. Anthony On Saturday, November 26, 2011 12:50:41 PM UTC-5, Massimo Di Pierro wrote: > > I THINK YOU WANT: > > def update_mytable(): > record=request.args[0] > form=SQLFORM(db.timbrata, > re

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
On 26 Nov, 18:50, Massimo Di Pierro wrote: > I THINK YOU WANT: > > def update_mytable(): >     record=request.args[0] >     form=SQLFORM(db.timbrata, >                      record, deletable=False) >     form.process(onaccept=lambda form: ( \ >             auth.archive(form), >             form.

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Sefa Denizoğlu
I have started with webfaction (as I was going to learn Django, and people suggested them very strongly for Django) a month ago but meanwhile I found out web2py since I was trying to find my own way of programming IN Python. Now I went for VPS of Hetzner (and I'm still fiddling with the basics of a

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Roberto De Ioris
> I was migrated to a newer webfaction server and now uwsgi compiles. I > first > tried limiting to 64 MB of memory and 1 process: > > uwsgi --http=127.0.0.1:port --pythonpath /user/web2py --module wsgihandler > -d /user/uwsgi.log -t 20 --async 24 --ugreen --limit-as 64 -r --no-orphans > -M -p 1 -

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Massimo Di Pierro
I THINK YOU WANT: def update_mytable(): record=request.args[0] form=SQLFORM(db.timbrata, record, deletable=False) form.process(onaccept=lambda form: ( \ auth.archive(form), form.record_id and db(db.mytable.id==form.record_id).update(field2='

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
On 26 Nov, 18:06, Anthony wrote: > On Saturday, November 26, 2011 11:40:27 AM UTC-5, Rocco De Marco wrote: > > > db.mytable.field2.requires = IS_IN_SET(['option1'],['option2']) > > I think you want: > > IS_IN_SET(['option1', 'option2']) > Yes, it is a my mistake... > > def update_mytable(): >

[web2py] Re: SQLFORM: change field value after/in update

2011-11-26 Thread Anthony
On Saturday, November 26, 2011 11:40:27 AM UTC-5, Rocco De Marco wrote: > > db.mytable.field2.requires = IS_IN_SET(['option1'],['option2']) > I think you want: IS_IN_SET(['option1', 'option2']) > def update_mytable(): > > record=request.args[0] > form=SQLFORM(db.timbrata, >

[web2py] SQLFORM: change field value after/in update

2011-11-26 Thread Rocco De Marco
Hi all, I'm a fresh newbie using w2p. I would hope my question is not so stupid, but I've spended a lot of time trying to resolve myself, without success... I've this model: db.define_table('mytable', Field('field1','string'), Field('field2')) db.mytable.field2.requires = IS_IN_SET(['option

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Vasile Ermicioi
a few advises: - I tested many uwsgi versions, but the most stable one I found to be 0.9.8.6 http://projects.unbit.it/downloads/uwsgi-0.9.8.6.tar.gz - you can set --async 10 without fear, this is the maximum requests handled at the same time - limit your database queries: gae limits database sea

Re: [web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-26 Thread Plumo
I was migrated to a newer webfaction server and now uwsgi compiles. I first tried limiting to 64 MB of memory and 1 process: uwsgi --http=127.0.0.1:port --pythonpath /user/web2py --module wsgihandler -d /user/uwsgi.log -t 20 --async 24 --ugreen --limit-as 64 -r --no-orphans -M -p 1 --touch-relo

[web2py] Re: starting web2py with uwsgi problem.

2011-11-26 Thread Plumo
do you know of any web2py websites with reasonable traffic using rocket?

[web2py] admin app session expiring

2011-11-26 Thread Plumo
I find the admin app logs out after every action (clicking a link, submitting a form, etc). Sessions work fine with my own app. Using web2py v1.99.2 with uwsgi. Any ideas? Richard

Re: [web2py] new to web2py/python

2011-11-26 Thread BrendanC
Build a small demo app (nothing too complicated)- study some of the sample apps and be sure to understand how the pieces fit together. Don't be afraid to borrow liberally from other apps when you start your own app - no point in reinventing the wheel. BrendanC

Re: [web2py] Re: MySQL ERROR

2011-11-26 Thread tOlorun
wow ... thoinx a million ... what can i do without you ... you're the best ... On 11/26/11, Massimo Di Pierro wrote: > db = DAL('mysql://w2p,pool_size=100') > > should be > > db = DAL('mysql://w2p',pool_size=100) > > > > On Nov 26, 5:34 am, tOlorun wrote: >> Hi guys >> >> iam new to usin

[web2py] Re: GitHub forking has one big flaw

2011-11-26 Thread Massimo Di Pierro
This is an excellent point and I have been worried about this. Anyway, I think the web2py project is sufficiently established that I am not worried. Massimo On Nov 26, 6:53 am, Gour wrote: > Interesting posthttp://zbowling.github.com/blog/2011/11/25/github/ > > Sincerely, > Gour > > -- > As the

[web2py] Re: MySQL ERROR

2011-11-26 Thread Massimo Di Pierro
db = DAL('mysql://w2p,pool_size=100') should be db = DAL('mysql://w2p',pool_size=100) On Nov 26, 5:34 am, tOlorun wrote: > Hi guys > > iam new to using web2py framework and iam getting this error > > Traceback (most recent call last): >   File "/usr/lib/pymodules/python2.7/gluon/restr

Re: [web2py] Re: github & hg repo

2011-11-26 Thread Phyo Arkar
Yeah github is Very Very attractive. But for me i host project internally in my office , so i choose hg. Now , Only if we build a killer APP for HG , that can go Toe to Toe with Github! everyone will happy. On Thu, Nov 24, 2011 at 6:34 PM, Bruno Rocha wrote: > I was an hg lover, for a long time

[web2py] GitHub forking has one big flaw

2011-11-26 Thread Gour
Interesting post http://zbowling.github.com/blog/2011/11/25/github/ Sincerely, Gour -- As the embodied soul continuously passes, in this body, from boyhood to youth to old age, the soul similarly passes into another body at death. A sober person is not bewildered by such a change. http://at

[web2py] MySQL ERROR

2011-11-26 Thread tOlorun
Hi guys iam new to using web2py framework and iam getting this error Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/gluon/restricted.py", line 192, in restricted exec ccode in environment File "/home/oluwaseun/web2py/applications/mySQLsbApp/models/db.py", line 18, i