[web2py] Re: Slightly off topic - Python Foundation needs help in a big way

2013-02-16 Thread Massimo Di Pierro
Yes this is very important. There was already a post on the subject: https://groups.google.com/forum/?hl=en&fromgroups=#!topic/web2py/pI0PldCkBEg On Saturday, February 16, 2013 9:20:59 PM UTC-6, Cliff Kachinske wrote: > > The Python Foundation is asking for help in proving that they are the > ri

[web2py] how to show login/logout auth in custom layout

2013-02-16 Thread 黄祥
hi, i've create the custom layout using http://www.cssportal.com/layout-generator/ and also the menu http://www.cssportal.com/css3-menu-generator/ and tried to use it on web2py application. views/custom_layout.html {{ response.files.append(URL('static','css/custom_layout.css')) response.fi

Re: [web2py] field of password type is displayed as cleartext in smartgrid form

2013-02-16 Thread wwwgong
Got it, Thx -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/o

[web2py] Re: How to set the form id on a custom form?

2013-02-16 Thread Anthony
The form.custom.begin object is not an HTML helper (because it only includes the opening form tag), so it cannot be manipulated like other helpers. In this case, it's probably easier to just manually code the opening form tag. So, instead of: {{=form.custom.begin}} just do: Anthony On Satu

[web2py] Slightly off topic - Python Foundation needs help in a big way

2013-02-16 Thread Cliff Kachinske
The Python Foundation is asking for help in proving that they are the rightful owners of the Python trademark in the EU. A software and services company in the UK is attempting to register the word "Python" as one of their trademarks. It will be a disaster for Python programmers in Europe if t

[web2py] How to set the form id on a custom form?

2013-02-16 Thread Tito Garrido
Hi Folks! I am trying to set an id on a custom form but it does not work, I have tryed: form['_id']='myform' form.custom['id'] = 'myform' form.custom['_id'] = 'myform' form.custom.id = 'myform' form.custom._id = 'myform' The first one works if I do not use custom forms... So how can I set it to a

[web2py] Re: orderby on an integer field appears to order as if field is a string

2013-02-16 Thread Massimo Di Pierro
Works for me: >>> db.define_table('tag_count', ... Field('name'), ... Field('count', 'integer'), ... format='%(title)s') >>> >>> import random >>> for k in range(10): ... db.tag_count.insert(name='xxx',count=random.randint(0,20)) >>> print db(

[web2py] orderby on an integer field appears to order as if field is a string

2013-02-16 Thread Neil Johnson
Hello I have a query like so result = db(db.tag_count.user_id == user_id).select(db.tag_count.name, db.tag_count.count, orderby=~ db.tag_count.count, limitby=(0, 10)) where db.tag_count is defined as db.define_table('tag_count', Field('name'), Field('user_id',

[web2py] Re: Need older versions of web2py

2013-02-16 Thread Massimo Di Pierro
Many old versions have recently been deleted to save space. It is better use git tags indeed. On Saturday, 16 February 2013 16:34:42 UTC-6, Niphlod wrote: > > or, until tags get pushed to github too, here > https://github.com/niphlod/web2py/tags > > On Saturday, February 16, 2013 10:56:56 PM UTC

[web2py] Default SQLFORM.grid / auth restrictions?

2013-02-16 Thread Matt House
Hello- I am new to Web2Py and I think I have a simple question, but I've banged my head on the desk for two hours and searched this forum to no avail. I have setup a basic database and want to give the user the ability to edit a series of fields using SQLFORM.grid. I also want users to be logge

Re: [web2py] Connecting to MySQL via SSL

2013-02-16 Thread Osman Masood
Thanks, Richard. It worked. The command I used was: ssh linux_user@ip_address -L 3307:database_ip:3306 (Our database is hosted on Amazon RDS, so for us ip_address was different from database_ip. ) Our connection string was: 'mysql://user:password@localhost:3307/database_name' Thanks again!

[web2py] Re: Need older versions of web2py

2013-02-16 Thread Niphlod
or, until tags get pushed to github too, here https://github.com/niphlod/web2py/tags On Saturday, February 16, 2013 10:56:56 PM UTC+1, Anthony wrote: > > http://web2py.com/examples/static/[version > number]/web2py_src.zip > (e.g., http://w

[web2py] Pretty URLs with cgihandler.py

2013-02-16 Thread Michael Haas
Hello all, my webhost only offers Python in CGI mode, so I'm currently using cgihandler.py which works reasonably well. My current URL is http:/host/cgihandler.py/ which shows the main page of my application just fine. However, I'd like the URL to be just http://host/ without the cgihandler.py

[web2py] Re: Need older versions of web2py

2013-02-16 Thread Anthony
http://web2py.com/examples/static/[version number]/web2py_src.zip (e.g., http://web2py.com/examples/static/2.3.2/web2py_src.zip). On Saturday, February 16, 2013 4:52:57 PM UTC-5, Hector Magnanao wrote: > > Where can I download previous vers

[web2py] Need older versions of web2py

2013-02-16 Thread Hector Magnanao
Where can I download previous versions of web2py ? I don't see them on the website. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@goo

[web2py] Re: web2py admin2 is DEAD?

2013-02-16 Thread rif
You can use any user email as long as you put the user in one of the w2a_root or w2a_manager groups: - If a user is in the w2a_root group then it has full rights including adding permissions or changing the groups of other users. - If a user is in the w2a_manager group

[web2py] Re: Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Niphlod
neither let's leave alone event('name') that isn't in the table. that query returns the event id for each device_id in the events table, and attaches to it brand and location from the devices table. additionally, it appends the date to it. the only way to retrieve that set in one query is s

[web2py] Re: SmartGrid and New button 1 to many

2013-02-16 Thread Dan Kozlowski
Jim, I still can't get it working. I have dailycounts which is one record per day and has many history records per day. Looking for a button to show all the history records when a day is selected form dailycounts. Below is the controller and DAL Thanks def dailycounts(): grid=SQLFORM.gr

[web2py] Re: google analytics

2013-02-16 Thread Niphlod
depending on your template, you may find somewhere in layout.html, at the bottom, something like {{if response.google_analytics_id:}} analytics.initialize({ 'Google Analytics':{trackingId:'{{=response.google_analytics_id}}'} }); {{pass}} or {{if response.google_analytics_id:}}

[web2py] Re: Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Dana
Not a direct answer but the packed up application is just a gzipped/tar file so you could just bypass the import function to see what the application looks like and see if there is a problem with paths etc. On Saturday, February 16, 2013 4:42:56 AM UTC-8, Srinath G S wrote: > > Hi, > > As menti

[web2py] Re: routes in windows service not working??

2013-02-16 Thread Dana Frost
I know this works in Linux but I am having the same issue. Seems that window web2py has some pre-complied pieces that kind of make this initial step (switching default app) a bit difficult. I kind of wish the windows distribution did not use these compiled pieces and you just used an installed

[web2py] Re: routes in windows service not working??

2013-02-16 Thread Dana Frost
I found the answer Ruben Orduz Mon, 19 Mar 2012 07:49:41 -0700 You have to re-start the web2py server NOT from the tk GUI (s

[web2py] Re: delete session strange behaviour

2013-02-16 Thread 黄祥
hi anthony, here is the trace back : TRACEBACK 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "/host/Downloads/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/host/Downloads/web2py/applications/retail/views/default/bill.html", line 83, in

Re: [web2py] Re: Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Massimo Di Pierro
Can you please try replace gluon/custom_import.py with the one in trunk: https://raw.github.com/web2py/web2py/master/gluon/custom_import.py and see if this has been fixed already? On Saturday, 16 February 2013 10:24:12 UTC-6, Srinath G S wrote: > > I use web2py 2.3.2 > > Lets say we have a file c

[web2py] Re: suggestion for markmin qr to use google chart

2013-02-16 Thread 黄祥
no worries, thank you for uploaded to trunk -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit ht

Re: [web2py] Re: Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Srinath
I use web2py 2.3.2 Lets say we have a file called utility,py in modules folder. I try the following in controller import utility This throws up the following error. Traceback (most recent call last): File "", line 1, in File "/web2py/gluon/custom_import.py", line 73, in custom_importer

Re: [web2py] Re: Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Srinath
I use the latest web2py(2.3.2). Let us say the modules folder in my application has a file called utility.py I try the following in controller import utility this issues a ticket saying Traceback (most recent call last): File "", line 1, in File "web2py/gluon/custom_import.py", line 73,

[web2py] google analytics

2013-02-16 Thread BlueShadow
Hi, I like to add google analytics to my application I did put the google analytics id(without the "UA-") to my menu.py but what do I have to do next? in google analytics it says tracking is not installed. thanks guys -- --- You received this message because you are subscribed to the Google G

[web2py] Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Derek
Looks good. Might want to order by date and then select top 1. Found this in an old post by Massimo... (db .table.id>0).select(orderby=~db.table.recordtiime,limitby=(0,1)).first() -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubs

[web2py] Re: Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Massimo Di Pierro
rows = db(db.event).select(groupby=db.event.device_id, left=db.devices.on(db.devices.id==db.event.device_id)) On Friday, 15 February 2013 15:26:08 UTC-6, Christian Espinoza wrote: > > Hi all!, could somebody get me a hand in order to improve this code, > please? > I'm g

[web2py] Re: Grid shows reference id when form allows empty reference

2013-02-16 Thread Edwin Haver
Thanks Anthony, That works perfectly. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https:/

[web2py] Re: Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Massimo Di Pierro
Which web2py version do you have? How are you doing the import? Please show us an example. "application.modules" should not be referenced anywhere in the source since it does not exist. On Saturday, 16 February 2013 06:42:56 UTC-6, Srinath G S wrote: > > Hi, > > As mentioned in the subject, wh

[web2py] Re: suggestion for markmin qr to use google chart

2013-02-16 Thread Massimo Di Pierro
Thank you!. Uploading to trunk. On Saturday, 16 February 2013 00:55:52 UTC-6, 黄祥 wrote: > > please find attached file. > the change that i've made is just for website and email address for > telephone there is a different parameter and i don't know how to make it in > that file (maybe must add s

[web2py] Re: web2py admin2 is DEAD?

2013-02-16 Thread MJo
How to get going with web2admin? What is the e-mail address it's asking for.. I have to fill db with some details (using old admin, or current default if you like) and after that I'm able to login via web2admin? What are the required minimums here? -- --- You received this message because yo

[web2py] Re: Grid shows reference id when form allows empty reference

2013-02-16 Thread Anthony
> > Field('billing_country', requires=IS_EMPTY_OR(IS_IN_DB(db, > db.country.id,'%(name)s'))) Field('billing_country', 'reference country', requires=IS_EMPTY_OR(IS_IN_DB(db, db.country.id, '%(name)s')), represent=lambda id, r: db.country[id].name if id else "") If you set your

[web2py] Re: delete session strange behaviour

2013-02-16 Thread Anthony
Difficult to help without knowing what the error is. Do you have a traceback? When you return a dict from a controller function, web2py looks for the associated view and then executes the view. If the view is expecting some variable to be in the returned dict but that variable happens not to be

[web2py] Re: SQLFORM grid shows reference id instead of name

2013-02-16 Thread Anthony
I assume you are expecting it to use the "country" table's "format" attribute to show the country name rather than the id. However, that only works automatically if (a) the field in question is a reference field (it is not in your first example), and (b) you do not explicitly set your own valid

[web2py] Re: Improve this code about ( sql query, dict creation for json service)

2013-02-16 Thread Niphlod
nope he's trying to get for every device only the last event On Saturday, February 16, 2013 12:14:10 AM UTC+1, Alan Etkin wrote: > > Try this. Not tested but should work: > > events = db(db.events.device_id==db.devices.id).select().as_dict() > > -- --- You received this message because

[web2py] Web2py import doesn't work. It says the modules folder is not found

2013-02-16 Thread Srinath
Hi, As mentioned in the subject, when I try importing any code inside the modules forlder of the application's folder, it says, application.modules not found. I tried putting __init__.py file in the modules folder. But that didn't help. Any suggestions? http://about.me/srinathgs I write code @ A

[web2py] Re: change writable for each record?

2013-02-16 Thread Alan Etkin
> > This does not work because writable must not be callable. > You can set the writable attribute before creating the form with the record data def is_writable(record): return or False def spam(): db.person.test.writable = is_writable(record) form = ... However, having writable

[web2py] Grid shows reference id when form allows empty reference

2013-02-16 Thread Edwin Haver
Hi all, When I allow the country reference to be empty in the below table, the SQLFORM.grid will show the country id instead of the name. When I just use 'reference country' it shows the country name in the grid and form but does not allow it to be empty. If I use a combination of both, it show

[web2py] SQLFORM grid shows reference id instead of name

2013-02-16 Thread Edwin Haver
Hello, I have created a grid with SQLFORM but the grid shows the country id instead of the country name. The form shows the name as expected but the grid does not. However, if I use 'reference country' it does but then I cannot leave the country empty in the account. Is there an easy way, other

[web2py] change writable for each record?

2013-02-16 Thread Martin Weissenboeck
I want to change the value of "writable" depending on another field, something like db.define_table('person', Field('name'), Field('test', 'boolean', writable=False), Field('testenable', 'boolean', default=True), ) db.person.test.writable = lambda v,r: r.testenable This does not

[web2py] Re: Setting up memcache on GAE - a basic question

2013-02-16 Thread Andy W
Hi howesc The stack trace from the SDK log console is: ERROR2013-02-16 09:50:09,757 restricted.py:161] Traceback (most recent call last): File "/Users/andy/www/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/Users/andy/www/web2py/applications