[web2py] Re: Voting system without users.

2014-03-22 Thread Encompass solutions
Thanks for the input. The site for viewing the grams are just webpages and votes are done from the web interface. I wasn't thinking correctly with how to store the items in the dictionary and I needed to add simple dictionary with the items they have voted for. So the problem is fixed. The

[web2py] Admin interface doesn't allow me to code very well from an android device.

2014-03-22 Thread Encompass solutions
When I try to view an admin page in my Android desktop it shows the mobile view. I have clicked the Request desktop site. option and the admin interface is still returned in the mobile view. I don't like this view when I run in on my android desktop at III have a full hd screen.

[web2py] Re: Can the DAL produce pivot table query (for use with Google Charts Plugin)?

2014-03-22 Thread Simon Ashley
or if you're not restricted to Google Charts, output the data as json in a request from dc.js. If you're doing a bit of multidimensional analysis, it can be a nice solution. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread weheh
Thanks PN and Dave. I neglected to mention that visiting a ticket just generates another ticket, so inspecting the error via the admin interface is a no go. I'll have to get at it some other way. I also neglected to mention that I had already performed the age-old ritual of deleting old

[web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-22 Thread weheh
+1 on PN's suggestion. That's how I do it. Works great. On Friday, March 21, 2014 5:25:47 AM UTC+8, PN wrote: You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every

Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-03-22 Thread Gary Climacosa
Thanks we are also planning to migrate to nginx. On Saturday, March 22, 2014, Encompass solutions encomp...@gmail.com wrote: The issue was fixed. Sorry for not seeing the follow up. I switched to NGIX and everything works perfectly. Haven't seen this issue since. BR, Jason Brower On

[web2py] Invert select orderby

2014-03-22 Thread Iuri Guilherme dos Santos Martins
I was trying to order the result of a sqlite select by date, but with an inverted order. I was hoping to access the SQLITE ORDER BY ASC/DESC like when I use direct SQL syntax, by means of the db().select() but I couldn't understand the specific syntax needed to acheive this. Current syntax

[web2py] Re: list:string type field output format

2014-03-22 Thread Pedro Pisandelli
Hi Antony! This made too many things clear to me. I got the point about represent function, but i guess the DIV(db...represent(...)) must be at a view file... and what about appadmin? Trying to get the fields value through appadmin, I got the error *sequence item 0: expected string, long found*

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread weheh
The problem clearly has to do with python not recognizing the with statement. I tried retrieving an older version of /admin followed by a complete clean wipe and then re-install of python 2.5.4. The problem persists. Not sure what to do next. Any suggestions? -- Resources: -

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread Michele Comitini
Did you try using python 2.7? Did you try removing all .pyc around? find web2py -type f -name '*.pyc' -exec rm -v {} + ; 2014-03-22 9:54 GMT+01:00 weheh richard_gor...@verizon.net: The problem clearly has to do with python not recognizing the with statement. I tried retrieving an older version

Re: [web2py] Nginx + Web2py

2014-03-22 Thread Michele Comitini
seems a problem of python version. if the app is not compiled you can try removing old .pyc floating around find web2py -type f -name '*.pyc' -exec rm -v {} + ; 2014-03-21 21:41 GMT+01:00 Anthony abasta...@gmail.com: Did you try re-recompiling the app? -- Resources: - http://web2py.com -

[web2py] New python.org layout

2014-03-22 Thread Michele Comitini
Seems that the new layout of python.org is here: http://python.org I see they keep forgetting to mention web2py as a web framework :-) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Invert select orderby

2014-03-22 Thread Annet
Hi, To sort in reverse order you add a tilde to db.image.date orderby=~db.image.date Kind regards, Annet -- 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)

[web2py] Create iOS, Android(.apk) clients for your web2py apps in minutes with this

2014-03-22 Thread sasogeek
What do you mean by consumes your web2py services? Is there such a platform that simply packages a fully built web2py app into an android app? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Create iOS, Android(.apk) clients for your web2py apps in minutes with this

2014-03-22 Thread 黄祥
please take a look at this discussion : https://groups.google.com/forum/#!msg/web2py/ajfU4UurfZE/YBrqzAEHNfAJ best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] functional test

2014-03-22 Thread 黄祥
hi, i want to learn about functional testing base on the book, but when i create and run it it return an error : C:\web2py\applications\test\controllerspython test.py Traceback (most recent call last): File test.py, line 1, in module from gluon.contrib.webclient import WebClient

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread weheh
Michele - Thanks for the suggestions. Moving to python 2.7 opens another can of worms because of a module I'm using that isn't ported to 2.7. So that test must wait until very last. However, I did remove .pyc all around, but still no go -- same problem. On Saturday, March 22, 2014 5:11:42 PM

[web2py] Re: New python.org layout

2014-03-22 Thread Stefaan Himpe
Michele Comitini wrote: Seems that the new layout of python.org is here: http://python.org My first impression: it feels too widely spaced for my smaller laptop screen. Their community menu runs off my screen (unless I go full-screen in my browser, which I normally never do). Although

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread Niphlod
I've always been the one pushing for dropping support for 2.4-2.5, and I got back always no, we'll keep 2.5. Seems that without any official statement we're dropping support for 2.5, due to https://github.com/web2py/web2py/blob/master/applications/admin/controllers/default.py#L807 On

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread Niphlod
@weheh: try to edit admin/controllers/default.py putting from __future__ import with_statement at the top On Saturday, March 22, 2014 1:42:38 PM UTC+1, Niphlod wrote: I've always been the one pushing for dropping support for 2.4-2.5, and I got back always no, we'll keep 2.5. Seems that

[web2py] MENU helper does not add active class

2014-03-22 Thread Ruud Schroen
Hi, I'm using the web2py MENU helper, but whenever i visit a page, the MENU helper does not add a active class to the li.. In the view: {{=MENU(response.menu,_id='navigation')}} In the model: submenu=[] response.menu = [(T('Home'), False, URL('default','index'), submenu)]

[web2py] Re: Creating a background task script on models, db is not defined.

2014-03-22 Thread Niphlod
http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules On Friday, March 21, 2014 9:28:14 PM UTC+1, Avi A wrote: Hi, I'm trying to create a background job/function. I'm locating the file on the models directory, as I read on the book. When I try to run

[web2py] Re: before_update callback and sheduler

2014-03-22 Thread Niphlod
if it happens in web2py's code, it will also in scheduler's environment. Please post a minimal app to reproduce the behaviour if it's repeatable On Friday, March 21, 2014 7:07:38 PM UTC+1, Carlos Cesar Caballero Díaz wrote: I have a _before_update callback, and it works when I update a record

Re: [web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-22 Thread Niphlod
you're all forgetting that: - relational database do have FK working - sqlite is not properly relational in matters of FK, unless you're working with a recent app (foreign key support was introduced by default in a recent release) and a fresh database - list:reference is not something baked in

[web2py] Re: Scheduler Task

2014-03-22 Thread Niphlod
this was discussed at length and now in 2.9.x there's a prevent_drift parameter that will make your tasks start at the same time. Unfortunately there's no mention of it in the changelog but its yet in the book http://web2py.com/books/default/chapter/29/04/the-core?search=prevent_drift On

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread weheh
@Niphlod: I had just found the from __future__ import with_statement in a stack overflow thread. I tried it out and now it seems the problem moves downstream. I'm still getting the endless ticket, but when I pick out the traceback, it looks like this: S'Traceback (most recent call last):\n

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Mariano Reingart
On Sat, Mar 22, 2014 at 9:26 AM, Stefaan Himpe stefaan.hi...@gmail.comwrote: Michele Comitini wrote: Seems that the new layout of python.org is here: http://python.org My first impression: it feels too widely spaced for my smaller laptop screen. Their community menu runs off my screen

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-22 Thread weheh
Sorry, I may have not have gotten the most recent ticket traceback. It is now this: S'Traceback (most recent call last):\n File I:\\web2py\\gluon\\restricted.py, line 212, in restricted\nexec ccode in environment\n File I:\\web2py\\applications\\admin\\controllers/default.py, line 16,

[web2py] Re: Creating a background task script on models, db is not defined.

2014-03-22 Thread Avi A
Yes I tried that too, it didn't help. but now for some reason I'm not getting the error any longer. Thanks. On Saturday, March 22, 2014 3:12:32 PM UTC+2, Niphlod wrote: make sure the model is run AFTER the one holding the db definition.models are executed alphabetically. On Friday,

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Mariano Reingart
On Sat, Mar 22, 2014 at 10:54 AM, Mariano Reingart reing...@gmail.comwrote: On Sat, Mar 22, 2014 at 9:26 AM, Stefaan Himpe stefaan.hi...@gmail.comwrote: Michele Comitini wrote: Seems that the new layout of python.org is here: http://python.org My first impression: it feels too widely

[web2py] Re: Creating a background task script on models, db is not defined.

2014-03-22 Thread Avi A
Sorry, I'm still getting the same error. I called that file: db_wizard_catalog_insert.py , so it's located after the db_wizard.py and I just run the file. Is that what you meant? On Saturday, March 22, 2014 4:05:03 PM UTC+2, Avi A wrote: Yes I tried that too, it didn't help. but now for some

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
Something very strange is going on. After I've run the Welcome test where the results are consistently fast (ie, ~1.6 seconds), if I wait an hour or so and run the test again, I get something like the following: Begin... Elapsed time: 97.1873888969 Percentage fill: 41.9664268585 Begin...

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
Scratch my solution. It's not correct. My test results are all over the place. You don't even have to wait an hour. Within the span of 15 minutes, I've gone from fast, fast, fast, fast, fast, fast to super-slow (90+ seconds), super-slow to slow, slow, slow, slow. The variability seems to be

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed [CLOSED]

2014-03-22 Thread weheh
OK, the emergency is over! Thanks all for your suggestions. The solution was for me to go further back in time and copy an older backup of admin into place, so admin is working again. Next exercise is to try to climb up to 2.7.X, but as I said, I'm held back by this old module I didn't write.

[web2py] Re: functional test

2014-03-22 Thread Massimo Di Pierro
You should be using the web2py source distribution is you plan to use your own version of python. On Saturday, 22 March 2014 07:13:04 UTC-5, 黄祥 wrote: hi, i want to learn about functional testing base on the book, but when i create and run it it return an error :

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread Massimo Di Pierro
Have you checked memory consumption? On Saturday, 22 March 2014 10:15:59 UTC-5, horridohobbyist wrote: Scratch my solution. It's not correct. My test results are all over the place. You don't even have to wait an hour. Within the span of 15 minutes, I've gone from fast, fast, fast, fast,

[web2py] New to Web2py - Runestone database issues

2014-03-22 Thread David Hale
Hey, I'm completely new to web2py and I am currently trying to install/run Runestone http://runestoneinteractive.org/build/html/developer.htmlon it. I've followed the specific instructions given to me by runestone up to the point where it says to modify the database if you get an error. I'm

[web2py] Re: test post

2014-03-22 Thread Daniel McBrearty
no problems. Actually I saw that posts were subject to approval and assumed it was awaitng. Then solved the issue myself anyway :-) so maybe google is even scarily smarter than we think ... ! On Thursday, 20 March 2014 10:21:38 UTC+1, Daniel McBrearty wrote: excuse me - my last post seems

[web2py] Re: functional test

2014-03-22 Thread 黄祥
i'm sorry forgot to tell that i'm using web2py source (latest version) with python 2.7.6 installed on windows 7 home premium 64 bit. the step i took for that are : - run web2py.py - create new application name test - create test.py in controllers folder with the content i copas (copy paste)

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Michele Comitini
@Mariano, the pip has the --user option for install command: pip install --user ... so no need to install system wide, but still I too do not understand why they do not go in the virtualenv 2014-03-22 18:14 GMT+01:00 Mariano Reingart reing...@gmail.com: On Sat, Mar 22, 2014 at 11:21 AM,

[web2py] Re: functional test

2014-03-22 Thread Massimo Di Pierro
I see. than there are two issues: 1) do not put test.py in the controllers folder else it is exposed put it in application/modules/ 2) it is not finding gluon. At the top of the file do: import sys; sys.path.append('/path/to/web2py') On Saturday, 22 March 2014 12:23:51 UTC-5, 黄祥 wrote: i'm

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Massimo Di Pierro
Are you telling me that the new python.org requires ruby? Massimo On Saturday, 22 March 2014 12:14:58 UTC-5, Mariano Reingart wrote: On Sat, Mar 22, 2014 at 11:21 AM, Mariano Reingart rein...@gmail.comjavascript: wrote: On Sat, Mar 22, 2014 at 10:54 AM, Mariano Reingart

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Ovidio Marinho
It was better to have done with web2py. Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com itjp.net...@gmail.com Brasil 2014-03-22 15:08 GMT-03:00 Massimo Di Pierro massimo.dipie...@gmail.com: Are you

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed [CLOSED]

2014-03-22 Thread Niphlod
BTW: working with multiprocessing (backported) in python 2.5 is a nightmare. On Saturday, March 22, 2014 4:20:20 PM UTC+1, weheh wrote: OK, the emergency is over! Thanks all for your suggestions. The solution was for me to go further back in time and copy an older backup of admin into

[web2py] Re: Creating a background task script on models, db is not defined.

2014-03-22 Thread Niphlod
try calling it z_whatever.py and see. On Saturday, March 22, 2014 3:34:48 PM UTC+1, Avi A wrote: Sorry, I'm still getting the same error. I called that file: db_wizard_catalog_insert.py , so it's located after the db_wizard.py and I just run the file. Is that what you meant? On

Re: [web2py] Nginx + Web2py

2014-03-22 Thread Federico Ferraro
I solved compiling admin app with python 2.6 : python26 -c import gluon.compileapp; gluon.compileapp.compile_application('applications/admin') Thanks .. 2014-03-22 6:15 GMT-03:00 Michele Comitini michele.comit...@gmail.com: seems a problem of python version. if the app is not compiled you

[web2py] Re: Creating a background task script on models, db is not defined.

2014-03-22 Thread Avi A
Same. /models/z_import_catalog.py, line 13, in module item = db(db.t_items.unfi_product == row[5]).select().first() NameError: name 'db' is not defined On Saturday, March 22, 2014 9:20:03 PM UTC+2, Niphlod wrote: try calling it z_whatever.py and see. On Saturday, March 22, 2014 3:34:48

[web2py] Re: Login form adittional fields

2014-03-22 Thread xgp . latino
Hi Leonel, I need to authenticate 3 fields instead if usual 2. Because i need to used identification number and type of identification document and the usual password to login. Gonna try login_bare. Thanks. El viernes, 21 de marzo de 2014 22:51:21 UTC-5, Leonel Câmara escribió: I don't

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
Well, according to the 'free' command, even when I'm getting these slowdowns, I'm nowhere close to the memory limits: total used free shared buffers cached Mem: 39252443929003532344 0 23608 123856 Like I said, my Linux server

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Michele Comitini
seems they need ruby because of this: https://github.com/ericam/susy *embarassing* 2014-03-22 19:08 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: Are you telling me that the new python.org requires ruby? Massimo On Saturday, 22 March 2014 12:14:58 UTC-5, Mariano Reingart wrote:

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
I'm considering delving into DTrace to find out what's going on, but any such instrumentation is apparently very problematic in Linux (eg, poor support, poor documentation, etc.). Is there any other way to find out what the hell is going on? On Saturday, 22 March 2014 16:24:20 UTC-4,

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Mariano Reingart
Not only susy, there seems to be even ruby code files inside the pythondotorg repository. In fact, all the chef directory (find -name *.rb | wc) counts 116 files (seems to be a kind of deployment automation) Susy is called in /settings/pipeline.py: PIPELINE_SASS_ARGUMENTS = '--quiet --compass

Re: [web2py] Re: New python.org layout

2014-03-22 Thread Mariano Reingart
Great news: We are now listed in https://www.python.org/ Congrats and thanks to the maintainers added it and that closed the ticket! Best regards Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] cannot import module from application's modules directory on pythonanywhere.com

2014-03-22 Thread stefaan
I have a copy of the music21 python library in the modules folder of my application. From the pythonanywhere bash prompt I can import it without problems: cd ~/web2py/applications/mints/modules python from music21 import chord chord module 'music21.chord' from 'music21/chord.pyc' When I

Re: [web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed [CLOSED]

2014-03-22 Thread weheh
@Niphlod: LOL. That's the same conclusion I came to in about 5 minutes. I rejiggered things and am sticking with subprocess module. Unfortunately, the damage was already done to my web2py setup. The silver lining to all this is I think I figured out how to get to python 2.7.x, so not all was a

[web2py] Re: functional test

2014-03-22 Thread 黄祥
thank you so much for your hint, massimo, it works well now. something like : *modules/functional_test.py* import sys; sys.path.append('../../../') the_rest_same_like_on_the_book thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: cannot import module from application's modules directory on pythonanywhere.com

2014-03-22 Thread 黄祥
is it running well in your local computer? or maybe try to import module like : import *chord* def index(): return *chord*.function_name_on_module_chord(function_argument_if_any) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Python Performance Issue, Part 2

2014-03-22 Thread horridohobbyist
I don't understand why the Flask version of the Welcome test doesn't exhibit this slowdown under Apache. It's executing the same application code. It's configured with the same processes=1 and threads=1 WSGI parameters. It's running the same Python interpreter (and presumably using the same