[web2py] Can't pickle instancemethod objects -- web2py FAIL!

2013-12-23 Thread weheh
Was doing a db migration and ran into this nasty: Traceback (most recent call last): File "C:\web2py\gluon\main.py", line 576, in wsgibase session._try_store_in_cookie_or_file(request, response) File "C:\web2py\gluon\globals.py", line 749, in _try_store_in_cookie_or_file self._try_sto

[web2py] Re: Help! Can't pickle instancemethod objects -- web2py FAIL!

2013-12-23 Thread Leonel Câmara
Delete all session files. I have also found that in windows boxes running apache + mod_wsgi, you will constantly run into session errors if you're running more than one web2py instalation as WSGIDaemonProcess doesn't work on windows so you can't have a dedicated wsgi process for each of the

[web2py] Re: Social Login - Twitter logs out plus some other issues- web2py 2.8.2 / Mac OS X 10.9.1

2013-12-23 Thread Leonel Câmara
I wouldn't bother, you shouldn't be using twitter login if you want to merge on email accounts as twitter does not provide you with the user's email. So, you have conflicting requisites, you want to merge social logins based on email and you want to have twitter login. It's possible, you

[web2py] Re: Help! Can't pickle instancemethod objects -- web2py FAIL!

2013-12-23 Thread weheh
Yes, I already did that. On Monday, December 23, 2013 6:38:57 PM UTC+8, Leonel Câmara wrote: > > Delete all session files. > > I have also found that in windows boxes running apache + mod_wsgi, you > will constantly run into session errors if you're running more than one > web2py instalati

[web2py] Re: Help! Can't pickle instancemethod objects -- web2py FAIL!

2013-12-23 Thread weheh
I have more details. As stated before, I erased all sessions. That didn't fix the problem. I then did a session.forget() from within my main routine. That got past the pickle problem temporarily, but created a lot of other problems. After that, I removed the session.forget() operation from the

[web2py] Re: login crash under 2.8.2

2013-12-23 Thread lucas
sorry i dropped off the map for a while. my server had a hard hardware crash and i have been managing its replacement. i think the processor or motherboard went bad because the memory and HD are testing out ok. i actually decided to goto amazon's EC2 and i am using centos 6,4 under that. it

[web2py] Re: login crash under 2.8.2

2013-12-23 Thread Leonel Câmara
No it's not wrong to use apache and wsgi, although there are better options if you use Linux, in my experience there's only a problem if you're running it on ms windows and you have more than one web2py instance as they share the same embedded mod_wsgi. -- Resources: - http://web2py.com - http

[web2py] Re: login crash under 2.8.2

2013-12-23 Thread lucas
oh yeah, i forgot to mention. i am running multiple domain names and i am using VirtualHost under apache to redirect to the proper web2py application. could that be the problem? i am using the session as files, i like that better then the DB option because, well, i just like it because it is

[web2py] Re: splitting fields from one table across two functions/views

2013-12-23 Thread lucas
ok, here is the snippets of code: @auth.requires_login() def worksheet0(): chkSession() msg = "" cidi = args_to_int(0) #case id tCase = db.cases tSheet = db.case_worksheets sCase = db(tCase.id==cidi).select().first() now = datetime.datetime.utcnow() if not sCase or

[web2py] Re: splitting fields from one table across two functions/views

2013-12-23 Thread lucas
so let me explain the above code a little. two views, two worksheets, via controller functions worksheet0 and worksheet0a. if you go into worksheet0a and modify the data any of the three text fields, the data is stored fine in the DB after you press the SUBMIT which displays "Save Worksheet a

[web2py] Re: bulk_upload to GAE development datastore no longer works?

2013-12-23 Thread David Manns
Here is the solution. The trick that is not well documented relates to how the new GAE SDK opens service ports. After starting the application using the launcher the GAE SDK log shows: 2013-12-23 08:32:28 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files (x86)\\Google\\google_a

[web2py] Re: Detecting MYSQL running status

2013-12-23 Thread Raj Chinna
Paolo, Thanks for the response. I just put 404 for as an example, I am may end up showing a page which asks the end user to contact the System Admin to fix the issue. What am doing is an webapp for a enterprise task. So, I may show few details about the issue. On Thursday, December 19, 2013 7

[web2py] Re: login crash under 2.8.2

2013-12-23 Thread LightDot
Apache and mod_wsgi under CentOS 6.x (or any other RHEL derivative, like Scientific Linux) tick like a clock. We us this combo for web2py almost everywhere. Are you using mod_wsgi as a deamon? Have you set up different process groups, users etc. for different virtual hosts? You could post the r

[web2py] Re: dropdown menu repopulate from database

2013-12-23 Thread Anthony
If you want the dropdown list to be updated without a page refresh, you'll have to make an Ajax call to retrieve the updated list and replace the HTML inside the UL with the new list. Anthony On Thursday, December 19, 2013 7:16:08 AM UTC-5, Yebach wrote: > > Hello > > I have the following quest

[web2py] Can't pickle instancemethod objects -- web2py [Closed]

2013-12-23 Thread weheh
Phew, finally figured it out. session.myvar was getting assigned a default value from a db field, so couldn't be pickled. On Monday, December 23, 2013 8:54:32 PM UTC+8, weheh wrote: > > I have more details. As stated before, I erased all sessions. That didn't > fix the problem. > > I then did a

[web2py] Re: Online classes

2013-12-23 Thread weheh
Wonderful, wonderful. On Tuesday, December 3, 2013 2:34:18 PM UTC+8, Massimo Di Pierro wrote: > > Hello everybody, > > As you know I teach a certification program about web development with > Python and I use web2py. > I posted my most recent classes online: > > https://vimeo.com/75499986 > http

Re: [web2py] Re: Password Transmitted in plain text

2013-12-23 Thread P T
It took a while, but I created a self-signed certificate, installed and configured Apache. Now, all the packets are transmitted as encrypted. Thanks for your help! PT On Tuesday, December 17, 2013 4:37:27 PM UTC-6, Jonathan Lundell wrote: > > On 17 Dec 2013, at 2:28 PM, P T > wrote: > > Thank

[web2py] import_from_csv_file (DAL) broken in 2.8.2?

2013-12-23 Thread David Manns
Using db.import_from_csv_file(...) to restore a complete database from a file created using db.export_to_csv_file(...) used to work. With 2.8.2 the process (at least in the development environment - I haven't tried in production environment) loops forever. The problem seems to be in gluon\dal.p

[web2py] How to represent dynamic fields in table

2013-12-23 Thread P T
I am using the following for "represent" fields in the table: *{Field(name, 'integer', default=0, represent = lambda value, row: DIV(value if value else '-',_class='month', _id=str(row.id) +'.'+name)) for name infields } The intention is to use jeditable for which I need a class and an id for e

[web2py] Re: web2py Jobs and meetups

2013-12-23 Thread P T
I am also interested in meet ups in Chicago area. PT On Wednesday, December 18, 2013 12:06:05 PM UTC-6, Michael Gheith wrote: > > I would love to attend any and all meet ups in Chicago. web2py has been > my bread and butter ever since I learned it :) > > On Tuesday, December 17, 2013 2:06:48 PM

[web2py] Re: Problem w/ cpdb.py script

2013-12-23 Thread Scott Hunter
Note that, when I tried to use the script to copy to a MySQL DB on pythonanywhere, I got a 150 error, that it couldn't create an auth table, and this may be related to foreign keys as well. - Scott On Sunday, December 22, 2013 3:36:47 PM UTC-5, Scott Hunter wrote: > > I'm trying to use the cpd

[web2py] Re: splitting fields from one table across two functions/views

2013-12-23 Thread Leonel Câmara
It should be clear that these 3 lines do absolutely nothing :) sform.vars.mtn_introduction = sform.vars.mtn_introduction sform.vars.mtn_body = sform.vars.mtn_body sform.vars.mtn_closing = sform.vars.mtn_closing These also don't do anything: v.mtn_introduction = v.mtn_

[web2py] Re: Problem w/ cpdb.py script

2013-12-23 Thread Alan Etkin
> > Note that, when I tried to use the script to copy to a MySQL DB on > pythonanywhere, I got a 150 error, that it couldn't create an auth table, > and this may be related to foreign keys as well. > Note that there is another issue about cpdb (actually about the DAL class constructor and the

[web2py] forgot password not working anymore

2013-12-23 Thread Bastiaan van der Veen
I have a problem with forgot password. When I enter a username that does not exist, I get the red bar validator under the field saying "Invalid username", so that functions correct. But when I enter a username that does exist, I get no validation error and the flash message says "Invalid usernam

[web2py] forgot password not working anymore

2013-12-23 Thread Bastiaan van der Veen
I have auth table with username and when I try forgot password the function fails. When I enter a non existing username, the validator says Invalid username. But when I enter a existing username the flash is shown with "Invalid username" but the field validates fine and the email is not being s

[web2py] forgot password not working

2013-12-23 Thread Bastiaan van der Veen
I use usernames with my auth table, but the forgot password function stopped working. When I enter a username that does not exist, I get a validation error(the red bar under the field saying 'Invalid Username'). But when I enter a username that does exist, I get no validation error, but the fla

[web2py] Request password reset not working

2013-12-23 Thread Bastiaan van der Veen
I have a auth table with usernames ( auth.define_tables(signature=True, username=True)) and my forgot password is not working anymore. It's the standard function: def user(): """ exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[ap

[web2py] Re: Wiki.auth 401 error

2013-12-23 Thread Alan Etkin
> > Hi Alan, it's 2.8.2 > I think we need to see the source; I tried to reproduce it, but couldn't. My system environment: 2.8.2-stable+timestamp.2013.12.20.15.08.47 (Running on Rocket 1.2.6, Python 2.7.3) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gith

[web2py] Re: Rendering 'raw' HTML for AngularJS with Web2py

2013-12-23 Thread rppowell
There are several ways to overcome the syntax collision with handlebars: 1. Change web2py's delimiter syntax to something other than double-curly-braces. 2. Have custom web2py html-helpers 3. Change handlebars's delimiter syntax. 4a. Have separate files for the handlebars templates - ng-include. 4

[web2py] Re: splitting fields from one table across two functions/views

2013-12-23 Thread lucas
yes, i thought those lines did absolutely nothing, however, when the simplest most stripped down code doesn't work and you start adding code in the hope something will provide a solution. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] Re: Trouble setting up database that chooses predefined options.

2013-12-23 Thread Cliff
Thanks Dave! You have been very helpful. I should be able to find my way from here. Thanks again :) On Friday, December 20, 2013 2:46:56 PM UTC-5, Dave S wrote: > > > On Thursday, December 19, 2013 9:06:27 PM UTC-8, Cliff wrote: >> >> Hi Dave >> >> Thanks for the reply! That was somewhat the pa

Re: [web2py] server slow down when face multiple requests

2013-12-23 Thread sonu kumar
@Paolo, I am using web2py Version 2.7.4 @viniciusban, I am not using sqlite On Sunday, 22 December 2013 01:16:50 UTC-8, Paolo Valleri wrote: > > what web2py version are you using? > have you already had a look here: > http://web2py.com/books/default/chapter/29/13/deployment-recipes#Efficiency-a

[web2py] Re: How to represent dynamic fields in table

2013-12-23 Thread Anthony
Try: lambda value, row, name=name: ... Anthony On Monday, December 23, 2013 11:38:08 AM UTC-5, P T wrote: > > I am using the following for "represent" fields in the table: > *{Field(name, 'integer', default=0, represent = lambda value, row: DIV(value > if value else '-',_class='month', _id=str(

[web2py] Help me understand how to create a search

2013-12-23 Thread Keith Planer
I'm new to web2py, and Python. I created a database, and I want to create a page where I can return records from a table of people, using their first and last names as search terms. What I have so far is: def patient_lookup(): #form = SQLFORM.grid(db.consumer, deletable = True) form=SQL

[web2py] How to run a web2py project from within PyCharm?

2013-12-23 Thread Hoon Chung
Hi, I just started to experiment with web2py by creating a blank project in PyCharm. Can somebody tell me how to run it from within PyCharm? The only documentation on web2py in PyCharm was to how create it but it doesn't mention how to run the project. Thanks for your help in advance. -- Resou

[web2py] Re: Postgres: what am i doing wrong ?

2013-12-23 Thread Kirill Surnov
Just tried it with postgresql: there are some tables without web2py definition, and I dont see it! other tables created on web2py I see. trying in python shell from 2.7.4 + timestamp.2013.10.14.15.16.29 db= DAL('postgresql://postgres:***@localhost/test',auto_import = True) вторник, 7 февраля

[web2py] Re: Postgres: what am i doing wrong ?

2013-12-23 Thread Kirill Surnov
PS: I want to use DAL for work with many tables and 2 databases at least , which are created by another noWeb2Py application. вторник, 24 декабря 2013 г., 1:32:18 UTC+4 пользователь Kirill Surnov написал: > > Just tried it with postgresql: > there are some tables without web2py definition, and I

[web2py] Re: Postgres: what am i doing wrong ?

2013-12-23 Thread Niphlod
apart from replying to a 4 months old thread. auto_import just imports .table files that are in the databases/* folder, so anything created strictly by web2py, i.e. exactly as described in the link http://web2py.com/books/default/chapter/29/6#Using-DAL-without-define-tables tl;dr : in web2

[web2py] Re: Postgres: what am i doing wrong ?

2013-12-23 Thread Niphlod
PS: there are a few helpers scripts in the scripts/ folder that can create models doing introspection, with some limits imposed on the complexity of the underlying existing data model. extract_mysql_models.py extract_oracle_models.py extract_pgsql_models.py extract_sqlite_models.py -- Resource

[web2py] Adding a user to a group if form.process().accepted

2013-12-23 Thread Avi A
Hi, How do I add records to some auth tables after submitting a form? I need something like that: First case: # creating a new group named as the new organization created with the form. if form.process().accepted: new_group = db.auth.settings.table_group.insert(role = form.vars.f_org_name ) #i

[web2py] trying to add a submit button to SQLFORM but it does nothing

2013-12-23 Thread Tim Richardson
def test_form(): grid = SQLFORM.grid(db.person, links=[dict(header='field1',body=lambda row: INPUT( _type='text',value='123',_name='field1 %s ' % row.id))]) grid_form = FORM(grid,INPUT(_type="submit",_name="testsubmit",_value= "testsubmit")) if grid_form.accept

Re: [web2py] Re: Integrated IDE does not color javascript code

2013-12-23 Thread António Ramos
I dont see it working. What is the status of javascript coloring? Thank you 2013/10/18 paolo.vall...@gmail.com > It should be fixed in trunk. Please have a try > > Paolo > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (So

[web2py] Re: How to run a web2py project from within PyCharm?

2013-12-23 Thread Tim Richardson
Do you have the professional or community edition of pycharm? If if the professional version, you actually run the web2py server (using its built in webserver, rocket), not a particular application. I open pycharm in the web2py directory, not the directory of my app. This means in the project t

[web2py] Re: How to run a web2py project from within PyCharm?

2013-12-23 Thread Avi A
run web2py.py. On Monday, December 23, 2013 11:05:22 PM UTC+2, Hoon Chung wrote: > > Hi, I just started to experiment with web2py by creating a blank project > in PyCharm. Can somebody tell me how to run it from within PyCharm? The > only documentation on web2py in PyCharm was to how create it

[web2py] Re: How to represent dynamic fields in table

2013-12-23 Thread P T
Thank you Anthony, that worked like a charm. Is this technique I should learn in Python or Web2Py? PT On Monday, December 23, 2013 3:17:56 PM UTC-6, Anthony wrote: > > Try: > > lambda value, row, name=name: ... > > Anthony > > On Monday, December 23, 2013 11:38:08 AM UTC-5, P T wrote: >> >> I am

Re: [web2py] Re: Integrated IDE does not color javascript code

2013-12-23 Thread paolo.vall...@gmail.com
Have you upgraded web2py? I've just double checked with web2py 2.8.2 and it works well Paolo 2013/12/23 António Ramos > I dont see it working. > What is the status of javascript coloring? > > Thank you > > > 2013/10/18 paolo.vall...@gmail.com > >> It should be fixed in trunk. Please have a t

Re: [web2py] Re: Rendering 'raw' HTML for AngularJS with Web2py

2013-12-23 Thread António Ramos
Nice examples posted. I just changed my view like the following *{{response.files.append(URL('static','angular-1.2.2/angular.js'))}}* *{{response.files.append(URL('static','controllers.js'))}}* *{{extend 'layout.html'}}* * [[x]] ** This way i have both at th

[web2py] Re: Wiki.auth 401 error

2013-12-23 Thread jimbo
Thanks again Alan, will play about with it over Xmas. I am running on Pythonanywhere. As I said, the built in Wiki worked when I tried it several months ago. Cheers! On Sunday, 22 December 2013 19:54:25 UTC, jimbo wrote: > > This used to work, activate the built in wiki, then register, log in

Re: [web2py] Help me understand how to create a search

2013-12-23 Thread Marco Mansilla
El Mon, 23 Dec 2013 13:08:20 -0800 (PST) Keith Planer escribió: > I'm new to web2py, and Python. I created a database, and I want to > create a page where I can return records from a table of people, > using their first and last names as search terms. What I have so far > is: > > def patient_loo

[web2py] Re: trying to add a submit button to SQLFORM but it does nothing

2013-12-23 Thread Tim Richardson
This works: grid_form = FORM(INPUT(_type="submit",_name="testsubmit",_value="testsubmit"),grid,INPUT(_type="submit",_name="testsubmit1",_value="testsubmit1",_class='btn'), ) That is, adding the submit button before the grid works (the second button still doesn't work)

[web2py] Re: forgot password not working anymore

2013-12-23 Thread Massimo Di Pierro
Please open a ticket about this. On Monday, 23 December 2013 10:33:43 UTC-6, Bastiaan van der Veen wrote: > > I have a problem with forgot password. When I enter a username that does > not exist, I get the red bar validator under the field saying "Invalid > username", so that functions correct.

[web2py] Re: How to represent dynamic fields in table

2013-12-23 Thread Anthony
That's just Python. When the lambda's are called, they get the value of name from the scope in which they were defined, so all the lambdas will use the last value of name, which is the last month. Instead, you should pass in name as an argument to each lambda, which will put it in the scope of

[web2py] Re: forgot password not working anymore

2013-12-23 Thread Brian M
I recently experienced something like this as well. Are you trying to do the reset from localhost or remotely? When I experienced this I found that oddly while the forgotten password form would not work when connecting to localhost, if I connected from another computer it worked fine. From loca

[web2py] Re: javascript in controller

2013-12-23 Thread Chun-Hung Chen
Special characters are automatically escaped in case of flaws. If you are 100% sure, you could make the text unescaped. However, it just affects how it looks in the source code and not relevant to your execution results. sonu kumar於 2013年12月21日星期六UTC+8上午6時56分34秒寫道: > > Hi, > > When I use below c

[web2py] Re: Online classes

2013-12-23 Thread Chun-Hung Chen
Hi, This is awesome. Are these links added and updated on the website? Massimo Di Pierro於 2013年12月3日星期二UTC+8下午2時34分18秒寫道: > > Hello everybody, > > As you know I teach a certification program about web development with > Python and I use web2py. > I posted my most recent classes online: > > http