Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread 黄祥
i'm trying to upgrade from 2.5.2 to 2.6.1 in pythonanywhere got an error : admin disabled because unable to access password file i've tried to reload, delete and recreate webapps again but have the same result. is there any hints to handle this kind of error? thanks and best regards, stifan --

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread 黄祥
sorry for my previous email, i've paste the wrong error. this is the error i got after upgrade : Internal errorTicket issued:

[web2py] Re: Data of 'reference db on select

2013-09-14 Thread אבי אברמוביץ
Currently I'm doing this and it works as expected: controller: items =db().select(db.t_items.ALL,cache=(cache.ram,10),cacheable=True) return dict(items=items) view: {{for item in items:}} {{if item.f_item_category == int(request.args(0)):}} displays items belonging to a specific category

[web2py] _before_delete callback function to update the other table

2013-09-14 Thread 黄祥
hi, i have a code : e.g. # ondelete_receipt_order def __ondelete_receipt_order(receipt_order): db(db.purchase_order_header.id==receipt_order.purchase_order_no).update(status='Purchase Order Authorized') # receipt_order_header db.receipt_order_header._before_delete.append(lambda s:

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Marin Pranjić
What does the error ticket contain? Marin (mobile) On Sep 14, 2013 9:05 AM, 黄祥 steve.van.chris...@gmail.com wrote: sorry for my previous email, i've paste the wrong error. this is the error i got after upgrade : Internal errorTicket issued:

[web2py] Re: simple button in grid question

2013-09-14 Thread villas
Try this... grid = SQLFORM.grid(query, links = [dict(header='Virtual Field', body=lambda row: A('Add a comment!', _href=URL('comment_on_a_suggestion', vars=dict(filter=row.id)))

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Niphlod
maybe pythonanywhere does its own things and needs to be informed about the update ? On Saturday, September 14, 2013 1:45:31 PM UTC+2, Marin Pranjić wrote: What does the error ticket contain? Marin (mobile) On Sep 14, 2013 9:05 AM, 黄祥 steve.van...@gmail.com javascript: wrote: sorry for

[web2py] Re: _before_delete callback function to update the other table

2013-09-14 Thread Niphlod
the ondelete doesn't receive a single record: it receives the set that is going to be deleted (remember, one can drop a whole bunch of rows with a single delete()) i.e. when you fire db(cond).delete(), cond is passed. If I understand what you're trying to do, you need to fetch the

[web2py] Re: Data of 'reference db on select

2013-09-14 Thread Niphlod
the syntax is more or less: db(filter).select(thefieldsyouneed) so, your conditions must be inside the db() and not the select() On Saturday, September 14, 2013 12:09:31 PM UTC+2, אבי אברמוביץ wrote: Currently I'm doing this and it works as expected: controller: items

[web2py] Re: Data of 'reference db on select

2013-09-14 Thread אבי אברמוביץ
Great, thanks , that works. Putting the conditions in the db(), probably the only option i didn't try... :). On Sunday, September 1, 2013 12:25:32 AM UTC+3, אבי אברמוביץ wrote: Hi, I do this query: items = db.executesql('SELECT * FROM project;') For the field below, which is a field in the

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
I need to see one of these tickets. I suspect the problem is that in 2.6.1 one admin file was missing but it is now in 2.6.2. In pythonanywhere you have a web based shell. You can just do: cd ~ wget http://web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip and the problem should go

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Ariya Oaum-aram
Dear Massimo, In my case, I upgrade from 2.5.1 to 2.6.1 to my web2py.app last night (Bangkok). Then I restart rocket server, after input password and start, there is a dialog box show this message = dlsym(0x7fff5fc43cc8, CCKeyDerivationPBKDF): symbol not found. I do download 2.6.2 but still

[web2py] Re: web2py on Android

2013-09-14 Thread xinx
I am facing perhaps a similar issue when I try to get my web2py (Version 2.5.1-stable+timestamp.2013.06.06.15.39.19) application running on a tablet with Android 4.3 and sl4a (python 2.6). GETs seems to be okay but POSTs (e.g. login as user) result in tickets. As any attempt to login results in

[web2py] unique=True for complex fields?

2013-09-14 Thread Copper Lark
db.define_table('tab', Field('exchg_id', 'reference exchgs', required=True), Field('xcurr_id', 'reference xcurrs', required=True), Field('key1', compute=lambda r: %s:%s % (r['exchg_id'], r['xcurr_id']), length=55, unique=True, required=True), ) not work (( --

[web2py] Re: unique=True for complex fields?

2013-09-14 Thread Massimo Di Pierro
What do you mean does not work? A field cannot be requires (as required in forms) and computed (it cannot be computed if present in forms). On Saturday, 14 September 2013 02:11:57 UTC-5, Copper Lark wrote: db.define_table('tab', Field('exchg_id', 'reference exchgs', required=True),

[web2py] upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Avi A
Hi, I've tried to upgrade via the admin from 2.6 to 2.6.1 and i got an error. When i tap on the error link it opens another error, so I don't know what is says. Repro: admin/ check for upgrades button. found upgrade. approved. After just a few seconds the error arrived.

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Avi A
The app itself works, only admin is off. On Saturday, September 14, 2013 4:46:38 PM UTC+3, Avi A wrote: Hi, I've tried to upgrade via the admin from 2.6 to 2.6.1 and i got an error. When i tap on the error link it opens another error, so I don't know what is says. Repro: admin/ check for

[web2py] web2py code generating its templates to that of an MVC JavaScript framework?

2013-09-14 Thread Alec Taylor
Dear web2py community, I think it would be great to get this feature added to the roadmap. In the meantime I will be sticking to my Bottle + hand-coded AngularJS approach. Below I have stipulated the advantages and disadvantages to code generating static JavaScript + HTML5 from our web2py

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Matthew Spence
Hi Massimo- I took a look through the error file and I suspect the relevant line is: from gluon.tools import Config\nImportError: cannot import name Config\n' Let me know if you want the whole error file. Thanks! -Matt On Sep 14, 2013, at 9:14 AM, Massimo Di Pierro

[web2py] Re: simple button in grid question

2013-09-14 Thread Alex Glaros
thanks Villas but I receive this error: Row' object has no attribute 'id' perhaps it doesn't know which of the joined ids to reference this work-around works because it let's system know which id it is: db.Idea.id.represent = lambda id, r: A('Add a comment!',

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread VP
Thanks Massimo for another great version of Web2py. I wonder if much of this can be handled automatically by web2py, instead of asking users to manually copy files. (It seems easy enough for web2py to look at the application folder and copy files automatically). The thing is web2py can be

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread greenpoise
Yes Hero! The export CSV works perfectly on filtered items. Thanks On Thursday, September 12, 2013 3:27:37 PM UTC-7, Massimo Di Pierro wrote: Web2py 2.6.1 is finally OUT. It needs some more testing. READ BELOW BEFORE UPGRADING Attention all users: For pre 2.6 applications to work

[web2py] Re: web2py code generating its templates to that of an MVC JavaScript framework?

2013-09-14 Thread Alan Etkin
Dear web2py community, I think it would be great to get this feature added to the roadmap. In the meantime I will be sticking to my Bottle + hand-coded AngularJS approach. I've been recently working in this plugin to fix it so it works with the latest web2py version.

[web2py] Is there an easy way to list all my 2Do's in a project?

2013-09-14 Thread Andreas Wienes
Hey guys, I know it's no web2py related question, but maybe someone of you got a clue. I'm working with Sublimetext and comment my next targets with # 2Do. Do you know an easy way to list all my 2Do's ? Thanks Andreas -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Paolo Valleri
Your ticket sounds strange to me, because tells us that your gluon/tools.py doesn't have the class Config. Did you really upgrade web2py? Have you compiled your app before upgrading? If so, remove the compiled code and try again. Let us know. Paolo On Saturday, September 14, 2013 4:05:37 PM

Re: [web2py] Is there an easy way to list all my 2Do's in a project?

2013-09-14 Thread António Ramos
install PlainTask for sublime. Look in youtube for a tutorial 2013/9/14 Andreas Wienes itsys...@gmail.com Hey guys, I know it's no web2py related question, but maybe someone of you got a clue. I'm working with Sublimetext and comment my next targets with # 2Do. Do you know an easy way to

[web2py] Re: simple button in grid question

2013-09-14 Thread villas
Maybe this would work using row.idea.id like this... grid = SQLFORM.grid(query, links = [dict(header='Virtual Field', body=lambda row: A('Add a comment!', _href=URL('comment_on_a_suggestion' , vars=dict(filter=row.idea.id http://row.id/))) )] ) You can also now include virtual

[web2py] Tab Views

2013-09-14 Thread GregD
I'm working with version 2.6.2 and liking tabbed windows. Great way to edit model,view and controller just by clicking the tab for each. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Michele Comitini
You seem to be running an old OS X? Please try the following: Rename the file gluon/pbkdf2_ctypes.py to something else for now. On the ubuntu server just follow instructions from Massimo i.e. unzip new web2py.zip version over the old install. mic Il giorno 14/set/2013 15:15, Ariya Oaum-aram

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Massimo Di Pierro
Please get 2.6.2 On Saturday, 14 September 2013 08:48:14 UTC-5, Avi A wrote: The app itself works, only admin is off. On Saturday, September 14, 2013 4:46:38 PM UTC+3, Avi A wrote: Hi, I've tried to upgrade via the admin from 2.6 to 2.6.1 and i got an error. When i tap on the error link

[web2py] The Ajax function question

2013-09-14 Thread Avi A
Hi, This is my link on the index page: {{extend 'layout.html'}} div id=ajax_target . a href=# onclick=ajax('{{=URL('default', 'categories', args=(category.id))}}', ['ajax_content'], 'ajax_target'){{=category.f_category_name}}/a .. /div where ajax_content is a div I want to

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Avi A
Alright, thanks. Just my admin section is off. So is there a way I can upgrade or shoul I create a new web2py instance? On Saturday, September 14, 2013 11:42:20 PM UTC+3, Massimo Di Pierro wrote: Please get 2.6.2 On Saturday, 14 September 2013 08:48:14 UTC-5, Avi A wrote: The app itself

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Or should I use: http://api.jquery.com/load/ Thanks. On Saturday, September 14, 2013 11:58:33 PM UTC+3, Avi A wrote: Hi, This is my link on the index page: {{extend 'layout.html'}} div id=ajax_target . a href=# onclick=ajax('{{=URL('default', 'categories', args=(

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Massimo Di Pierro
You simply need to put this file: https://raw.github.com/web2py/web2py/master/applications/admin/settings.cfg into /applications/admin/settings.cfg On Saturday, 14 September 2013 16:00:59 UTC-5, Avi A wrote: Alright, thanks. Just my admin section is off. So is there a way I can upgrade or

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Avi A
It's already there. On Sunday, September 15, 2013 12:16:00 AM UTC+3, Massimo Di Pierro wrote: You simply need to put this file: https://raw.github.com/web2py/web2py/master/applications/admin/settings.cfg into /applications/admin/settings.cfg On Saturday, 14 September 2013 16:00:59 UTC-5,

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread 黄祥
i've tried massimo suggestion to update it from web shell : here is the step that i take following massimo suggestion. - i leave my webapp untouch - i goes to bash console and execute the command : cd ~ wget http://web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip replace

[web2py] Re: The Ajax function question

2013-09-14 Thread Anthony
The ajax() function documentation is here: http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function . Note, the second argument does not do what you think it does. It should be an array of input element names (not div id's) that are on the current page (not on the page

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Second option works, but what do you mean by that particular view will not be compileable? On Saturday, September 14, 2013 11:58:33 PM UTC+3, Avi A wrote: Hi, This is my link on the index page: {{extend 'layout.html'}} div id=ajax_target . a href=# onclick=ajax('{{=URL('default',

[web2py] Re: The Ajax function question

2013-09-14 Thread Anthony
If you put the following line in a view: {{extend 'layout.html' if not request.ajax else None}} that view will not compile if you elect to compile the application (compiling is an option in the admin app). Compiling an app is optional, but it does speed up execution. So, the above method will

[web2py] Re: _before_delete callback function to update the other table

2013-09-14 Thread 黄祥
yeah, my goal is when i delete receipt order it will update the purchase order status. i've followed your suggestion, but still not update the status of purchase order when i delete the receipt order (no error occured, just not update the purchase order). def __ondelete_receipt_order(s):

Re: [web2py] Is there an easy way to list all my 2Do's in a project?

2013-09-14 Thread Andreas Wienes
Hello Ramos, that's not exactly what I'm looking for, but I will try it out. Thanks for your help! Am Samstag, 14. September 2013 19:10:16 UTC+2 schrieb Ramos: install PlainTask for sublime. Look in youtube for a tutorial 2013/9/14 Andreas Wienes itsy...@gmail.com javascript: Hey guys,

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Thanks. On Sunday, September 15, 2013 1:31:17 AM UTC+3, Anthony wrote: If you put the following line in a view: {{extend 'layout.html' if not request.ajax else None}} that view will not compile if you elect to compile the application (compiling is an option in the admin app). Compiling an

[web2py] Re: Is there an easy way to list all my 2Do's in a project?

2013-09-14 Thread Andreas Wienes
I found a great solution called SublimeTODO. Read more about it here https://github.com/robcowie/SublimeTODO -- 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] Re: simple button in grid question

2013-09-14 Thread Alex Glaros
it works correctly Villas, thanks. how could I turn Add a comment! text into a button. Possible syntax ,_class=btn btn-mini, but where does it go? thanks, Alex On Saturday, September 14, 2013 10:23:00 AM UTC-7, villas wrote: Maybe this would work using row.idea.id like this... grid =

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Matthew Spence
Hi guys- I just tried a fresh install of web2py on PythonAnywhere. (So, only the stock applications of welcome, admin, and examples.) It auto-installs with 2.5.1, so I hit the button to upgrade to 2.6.2. It looks like it starts to install, but then I get Internal Error again. I pasted the

[web2py] Re: upgrading from 2.6 to 2.61 issue.

2013-09-14 Thread Peter Etchells
I had the same problem. the error in admin/errors showed that gluon/tools.py had not been updated. replaced my tools.py with the one in https://raw.github.com/web2py/web2py/master/gluon/tools.py things are better. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Adnan Smajlovic
Thank you Massimo, and all contributors for a constant improvement of the most amazing framework! On Thu, Sep 12, 2013 at 6:27 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Web2py 2.6.1 is finally OUT. It needs some more testing. READ BELOW BEFORE UPGRADING Attention all

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
I believe the problem is that the pythonanywhere process has not restarted. Your are still running the old one with the new applications, the new applications expect the new modules, but find the old ones in memory. To fix the problem: In the Dashboard click on [web] and press the button

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
If this is the error: admin/139.192.164.192.2013-09-14.07-00-36.1c5f90cc-b8dd-4104-9b5c-0febff88170ahttps://sugizo.pythonanywhere.com/admin/default/ticket/admin/139.192.164.192.2013-09-14.07-00-36.1c5f90cc-b8dd-4104-9b5c-0febff88170a and you cannot open the ticket. You need to open the file:

Re: [web2py] Re: How to make smartgrid redirect to edit after creating new record?

2013-09-14 Thread Adnan Smajlovic
Alex, Can you please clarify what model do you need? I can post the sample code but not sure what exactly do you need. On Fri, Sep 13, 2013 at 8:13 PM, Alex Glaros alexgla...@gmail.com wrote: Adi, can you post the model for this? thanks, Alex Glaros On Friday, December 23, 2011

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread 黄祥
thank you so much for your hints, massimo, it works well now. just want to share the step i take : *worked* - i leave my webapp untouch - i goes to bash console and execute the command : cd ~ wget http://web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip replace web2py/web2py.py?

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread 黄祥
sorry, forgot to add the step *reload your domain* * * *worked* - i leave my webapp untouch - i goes to bash console and execute the command : cd ~ wget http://web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip replace web2py/web2py.py? [y]es, [n]o, [A]ll, [N]one, [r]ename: A - reload

[web2py] Re: simple button in grid question

2013-09-14 Thread Adi
lambda row: A('Complete', _class='btn', _id='btn_complete', _onclick='return confirm(Complete Order %s? (%s %s))' % (row.id,

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread tomt
Hi, I am getting a mysql error after upgrading to 2.6.1(and 2.6.2) Web2py doesn't throw a ticket, rather the mysql error shows up directly on the browser: Query Not Supported: (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
Can you please explain this sentence Web2py doesn't throw a ticket, rather the mysql error shows up directly on the browser? Where do you see this error? What steps caused it? Can you post a screenshot? You have a field called date. That should not be allowed. Are you sure it worked before?

[web2py] Hooking up Validation to Client-Created Form Elements

2013-09-14 Thread Shawn Wheatley
I'm working on an app with a master/detail-style view with a number of detail lines that can be increased on the client. Right now, I'm using jQuery to clone the table row of controls above and renaming the form elements (named following a pattern of item___001, item___002, etc.) This works

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Matthew Spence
Hey Massimo, I tried reloading all of my domains multiple times, and it still throws the same error, even with a stock, automatic fresh install of web2py from PA. On Saturday, September 14, 2013 8:34:18 PM UTC-4, Massimo Di Pierro wrote: I believe the problem is that the pythonanywhere

[web2py] Re: simple button in grid question

2013-09-14 Thread Alex Glaros
Works perfect Adi and Villas, much appreciated. Here's the complete code: def view_all_suggestions_and_comments(): query = (db.IdeaComment.ideaID==db.Idea.id) (db.IdeaComment.partyID==db.Party.id) grid = SQLFORM.grid(query, ,links = [dict(header='Virtual Field', body=lambda row:

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
This is the error in the ticket you posted: Traceback (most recent call last):\n File /home/mattspence/web2py/gluon/restricted.py, line 212, in restricted\n exec ccode in environment\n File /home/mattspence/web2py/applications/admin/controllers/default.py, line 14, in module\nfrom

[web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
BTW web2py.com runs on PythonAnywhere. I upgraded by unzipping web2py_src.zip over the old one, restarted the server, and everything worked as expected. On Saturday, 14 September 2013 20:39:00 UTC-5, Matthew Spence wrote: Hey Massimo, I tried reloading all of my domains multiple times,

Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-14 Thread Massimo Di Pierro
This helps a lot. Can you please email me (confidentially) your email and controller? On Saturday, 14 September 2013 21:15:11 UTC-5, tomt wrote: Yes, the program worked before. The error appears when I select the 'note_list' function/controller. I've attached a screenshot.(I hope it

Re: [web2py] Re: How to make smartgrid redirect to edit after creating new record?

2013-09-14 Thread Alex Glaros
Adi, you had a tiny working example above *this works: grid=SQLFORM.smartgrid(.* is the data model available for that? I'm looking for any small self-contained working example of smartgrid redirecting to edit thanks, Alex On Saturday, September 14, 2013 5:38:58 PM UTC-7, Adi