[web2py] Re: no email field in auth_user

2015-02-18 Thread Annet
I had a similar issue, the problem was the validator on email: requires = is_unique_email is_unique_email = [ IS_EMAIL(error_message=self.messages.invalid_email), IS_NOT_IN_DB(db, '%s.email' % settings.table_user_name, error_message=self.messag

[web2py] Re: Problem with JSON

2015-02-18 Thread Ivan Gazzola
Ok, solved :) The issue was in some changes in Jquery. Now JQuery parses ajax response before than it is passed to success function, so js fails if I call "parse" on it: risposta=JSON.parse(json); ^^^ THX Ivan Il giorno lunedì 16 febbraio 2015 21:12:17 UTC+1,

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-02-18 Thread Francisco Costa
Some of the web2py content should be colaborative, maybe a wiki or a file in github so developers could provide changes On Tuesday, 17 February 2015 01:21:32 UTC, Massimo Di Pierro wrote: > > We have always been listing companies that do web2py support. Eventually > we should have a certificatio

[web2py] Re: Facebook buttons and ajax

2015-02-18 Thread Gael Princivalle
So this part: (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/it_IT/sdk.js#xfbml=1&version=v2.0 "; fjs.parentN

[web2py] The best NoSQL? PostgreSQL

2015-02-18 Thread Michele Comitini
of course ;-) http://www.linuxjournal.com/content/postgresql-nosql-database mic -- 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) --- You received this messag

Re: [web2py] dynamic IS_DATE_IN_RANGE validator

2015-02-18 Thread Ovidio Marinho
Example: v = *IS_DATE_IN_RANGE*(minimum=datetime.date(2008,1,1), maximum=datetime.date(2009,12,31), format="%m/%d/%Y",error_message="oops") [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Fal

[web2py] Re: dynamic IS_DATE_IN_RANGE validator

2015-02-18 Thread Leonel Câmara
Hey, You need to use onvalidation: http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation I guess you could also set the requires for db.events.end_date in the controller if you have request.vars.start_date but then you would have to validate start_date first too a

[web2py] Re: orderby field empty always in first place

2015-02-18 Thread Leonel Câmara
Example 2 query solution: def events(): events = db(db.events.end_date == None).select() events.records += db(db.events.end_date != None).select(orderby=~db. events.end_date).records return locals() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] IPython Vim and Web2py shell

2015-02-18 Thread Thomas Bellembois
Hello, Is there any way to attach vim with the vim-ipython plugin (https://github.com/ivanov/vim-ipython) to an existing Web2py shell ? I would like to be able to start my application in shell mode: ./web2py.py -a foo -S myapp -M And then attach vim to this shell instance: :IPython --existing ke

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-18 Thread Richard Vézina
Hello Niphold, What is the advantage of Behave over Lettuce or other (or why you choose Behave)? You didn't implement Unit test, is it because Vinicius already demonstrate it or because other consideration? Thanks Richard On Mon, Feb 16, 2015 at 5:00 PM, Niphlod wrote: > first to the party

[web2py] Re: The best NoSQL? PostgreSQL

2015-02-18 Thread Willoughby
But even the author admits that's a lie :-) "Fine, perhaps I'm exaggerating a bit here. PostgreSQL was and always will be relational and transactional, and adding these new data types hasn't changed that. " On Wednesday, February 18, 2015 at 6:25:20 AM UTC-5, Michele Comitini wrote: > > of cour

[web2py][OT] HTTP/2 Finalized

2015-02-18 Thread Richard Vézina
http://tech.slashdot.org/story/15/02/18/1358230/http2-finalized Richard -- 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) --- You received this message because

[web2py] Re: please help test binaries

2015-02-18 Thread Dave S
Enter code here... On Friday, February 13, 2015 at 10:19:23 PM UTC-8, Massimo Di Pierro wrote: > > Can you please help us test the binaries? > > http://www.web2py.com/examples/static/nightly/web2py_win.zip > http://www.web2py.com/examples/static/nightly/web2py_osx.zip > > I also tested the Windo

[web2py] Re: orderby field empty always in first place

2015-02-18 Thread Dave S
On Wednesday, February 18, 2015 at 4:22:11 AM UTC-8, Leonel Câmara wrote: > > Example 2 query solution: > > > def events(): > events = db(db.events.end_date == None).select() > events.records += db(db.events.end_date != None).select(orderby=~db. > events.end_date).records > return loc

[web2py] How to copy and move a file from the admin interface?

2015-02-18 Thread François Delpierre
Hi, >From the admin interface, it's easy to create a new file or to delete it, but how do I move one to an other folder, or just copy an existing one to a new file name? This is one of the few operation I still need a shell on the server for. Regards, -- Resources: - http://web2py.com - http

Re: [web2py] Re: The best NoSQL? PostgreSQL

2015-02-18 Thread Michele Comitini
If you are interested this is more to the point, and from a postgresql guy: https://wiki.postgresql.org/images/b/b4/Pg-as-nosql-pgday-fosdem-2013.pdf even if it is fun to read, it's not a joke. 2015-02-18 16:10 GMT+01:00 Willoughby : > But even the author admits that's a lie :-) > > "Fine, perh

Re: [web2py] Re: The best NoSQL? PostgreSQL

2015-02-18 Thread Richard Vézina
Nice reading, Thanks Michele Richard On Wed, Feb 18, 2015 at 11:17 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > If you are interested this is more to the point, and from a postgresql guy: > > https://wiki.postgresql.org/images/b/b4/Pg-as-nosql-pgday-fosdem-2013.pdf > > even if it

[web2py] New Application Wizard trouble

2015-02-18 Thread Kelvin Nyota
I have just finished creating my new website with the New Application Wizard, but could not find the website i have created through http://www.web2py.com/demo_admin/wizard/index. I have checked everywhere on my documents, the place where in installed Web2py and extracted it, my desktop but coul

[web2py] Re: web2py session error: ('NoneType' object is not callable)

2015-02-18 Thread Jason Lee
It did not solve the issue. On Tuesday, February 17, 2015 at 8:50:15 AM UTC-5, Jason Lee wrote: > > I will attempt to try now. > > On Monday, February 16, 2015 at 12:37:22 AM UTC-5, Massimo Di Pierro wrote: >> >> can you check if the latest nightly build fixes the problem. Actually you >> do not

[web2py] Re: DAL database adapter only validates datetime on read.

2015-02-18 Thread MDSIII
Controller: def creategoodevent(): """ create a record with a string for the datetime field that is formatted like isoformat() i.e. '%Y-%m-%d %H:%M:%S.%f' """ dt_str = request.now.isoformat(' ') new_id = db.myevent.insert(name=dt_str, dt=dt_str,

[web2py] can't type forward slash in editor

2015-02-18 Thread dangnearhere
Day 1 newbie. I feel I have entered a new wonderland of capabilities, and lucky to have found web2py, with all the noise being made about flask and django. Flask is all "now to do this you have to install that" and django's "awesome documentation" made me want to give up. Web2py on the other han

[web2py] Re: Google Appengine Geo Headers

2015-02-18 Thread Sébastien Loix
Hi Niphlod, I haven't been able to try in another application, this is my first app on Google Engine. I just printed the request.env to see if the X-AppEngine-CityLatLong' header was in it and didn't see it. So you're saying that it is something I should check on GAE side then? thanks for your

[web2py] Re: Reuse code in multiple views

2015-02-18 Thread Moiz Nagpurwala
Thanks Leonel for the reply. Putting the repeating code in a separate html file and including that file in appropriate places worked for me. Thanks a lot. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.g

[web2py] web2py Scheduler with Postgres creates "idle in transaction" connections

2015-02-18 Thread stingpan
web2py version: 2.9.12-stable Postgres server: 9.1 I have 3 databases for my application, only one is designated for Scheduler and its tables. What I noticed is that when I start scheduler (using upstart deployment and running "start web2py-scheduler" as root), all 3 databases are immediately c

[web2py] (foreign key constraint failed)

2015-02-18 Thread Smruti Prakash Mohanty
Hi I am using the web2py default auth table for user registration. I am having an additional table defined as such: db.define_table('nsksystem', Field('email_id', db.auth_user,length=512, label = 'Email ID'), Field('nskname', length=128, default='', label = 'Mach

[web2py] if form.process().accepted: workings

2015-02-18 Thread Annet
I' ve got the following function: def lander_form(): nodeID = get_ID(auth, session) folder = 'nodeID' + str(nodeID) db.lnd_page.image.uploadfolder = os.path.join(request.env.applications_parent, 'applications', 'dbmode

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2015-02-18 Thread Leonel Câmara
Hey Massimo, Please add us: Company: I Am Consultoria Incorporated: Portugal website: http://i-am.pt Mention to web2py can be seen here: http://i-am.pt/gallery-whatwedo.html We will be updating our website (for some reason this keeps being delayed by other projects) but the design is decent en

[web2py] Re: please help test binaries

2015-02-18 Thread Dave S
On Wednesday, February 18, 2015 at 7:58:36 AM UTC-8, Dave S wrote: > > Enter code here... > > > > On Friday, February 13, 2015 at 10:19:23 PM UTC-8, Massimo Di Pierro wrote: >> >> Can you please help us test the binaries? >> >> http://www.web2py.com/examples/static/nightly/web2py_win.zip >> http:

[web2py] Re: no email field in auth_user

2015-02-18 Thread José Eloy
Thanks guys for your answers: I'm using a standard SQLFORM to create my form: form = SQLFORM(db2.auth_user, submit_button="Aceptar", deletable=True, showid=False, formstyle='divs', _id='form_administrador') Where is the problem? -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Re: if form.process().accepted: workings

2015-02-18 Thread Niphlod
what are you expecting precisely ? if the problem is that upon record deletion the corresponding file in the uploads folder is not deleted, mind that it's a standard behaviour unless in the field you specify autodelete=True On Wednesday, February 18, 2015 at 7:41:05 PM UTC+1, Annet wrote: > > I

[web2py] Re: Google Appengine Geo Headers

2015-02-18 Thread Niphlod
maybe it's just GAE not inserting that header because you're developing on your local machine. On Wednesday, February 18, 2015 at 3:52:59 PM UTC+1, Sébastien Loix wrote: > > Hi Niphlod, > > I haven't been able to try in another application, this is my first app on > Google Engine. > I just print

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-18 Thread Niphlod
the idea behind the project was to have BDD done. Vinicius was covering already unittesting. IMHO web applications (or, at least, the ones I code) rely on too many pieces you can't test without a live browser. Once that concept sinks in, you'll quickly realize that unittesting is too limited wh

[web2py] Re: Facebook buttons and ajax

2015-02-18 Thread Niphlod
I don't know how the fb script works. The point is that if it works on an element that is present on the page AFTER being LOAD()ed, at the time you run the script on the "container" the LOAD()ed piece is likely not to be there already. On Wednesday, February 18, 2015 at 11:26:08 AM UTC+1, Gael

[web2py] Re: (foreign key constraint failed)

2015-02-18 Thread Niphlod
a little bit of wording around "unfortunately I can't turn off" it's not that having constraints in place is limiting your app. It's because something REAALLY wrong with your application that that error pops up (and it'll pop up with any other backend). I'd be more inclined to say "thanks a

[web2py] Re: Problem with JSON

2015-02-18 Thread Niphlod
to be fair, I think you encountered a minor glitch response.json() now sets the content-type to application/json (something that your app should have done already, but probably overlooked). Returning a json string with text/html as content-type made jquery not aware that that string was

[web2py] Re: New Application Wizard trouble

2015-02-18 Thread Dave S
On Tuesday, February 17, 2015 at 12:11:47 PM UTC-8, Kelvin Nyota wrote: > > I have just finished creating my new website with the New Application > Wizard, but could not find the website i have created through > http://www.web2py.com/demo_admin/wizard/index. I have checked everywhere > on my d

[web2py] Re: DAL database adapter only validates datetime on read.

2015-02-18 Thread Niphlod
that's pretty much expected: the general rule is that if you want your fields validated at insert level, you shouldn't use insert() but validate_and_insert(). this, however, it's only an issue with SQLite (mainly) because it doesn't have a native datetime field, so it doesn't complain even if yo

[web2py] Re: web2py Scheduler with Postgres creates "idle in transaction" connections

2015-02-18 Thread Niphlod
uhm, the problem is more subtle. The main process of the scheduler is like a shell opened on that application... it needs to reads models to see the scheduler definition. I guess that this means that it will also connect to all the databases defined in models, even if it will effec

[web2py] Re: Return object from represent method of field

2015-02-18 Thread Dave S
On Tuesday, February 17, 2015 at 6:31:26 PM UTC-8, Leonardo Pires Felix wrote: > > Also, there is a way to represent two types, text and html? > > For example, if i want to make a tooltip of a date fiel, to make things > clean and easy for the user, I would do: > > >

[web2py] Re: can't type forward slash in editor

2015-02-18 Thread Dave S
On Wednesday, February 18, 2015 at 7:56:04 AM UTC-8, dangne...@juno.com wrote: > > Day 1 newbie. I feel I have entered a new wonderland of capabilities, and > lucky to have found web2py, with all the noise being made about flask and > django. Flask is all "now to do this you have to install th

[web2py] Re: web2py Scheduler with Postgres creates "idle in transaction" connections

2015-02-18 Thread Niphlod
uhm^3. The code is quite unfixable as it is (launching scheduler with web2py.py -K appname). Remember that the only thing I'm trying to fix is the main process using idle connections to all databases defined in the models of you app. However, there's a small unknown trick: the scheduler can be

[web2py] Re: How to copy and move a file from the admin interface?

2015-02-18 Thread Dave S
On Wednesday, February 18, 2015 at 8:12:45 AM UTC-8, François Delpierre wrote: > > Hi, > > From the admin interface, it's easy to create a new file or to delete it, > but how do I move one to an other folder, or just copy an existing one to a > new file name? > This is one of the few operation

[web2py] Re: (foreign key constraint failed)

2015-02-18 Thread Anthony
Did this solve your problem? On Wednesday, February 18, 2015 at 5:07:02 AM UTC-5, Smruti Prakash Mohanty wrote: > > Hi > > I am using the web2py default auth table for user registration. > > I am having an additional table defined as such: > > db.define

[web2py] Re: no email field in auth_user

2015-02-18 Thread Anthony
I cannot reproduce the problem -- if I set the readable and writable attributes of the email field to False, I get no email field in any form based on db.auth_user, and I am able to submit new records. There must be some additional code somewhere you haven't shown that is resetting those attrib

[web2py] Re: if form.process().accepted: workings

2015-02-18 Thread Anthony
> Since checking the form.vars.image__delete and submitting the form did not > remove the image file, I wrote the code after: if form.process().accepted: > It does exactly what I intended, however, I don't understand why :-( > > Why do I stille have access to record and form after: if > form.pro

Re: [web2py] Re: web2py Scheduler with Postgres creates "idle in transaction" connections

2015-02-18 Thread Michele Comitini
idle connection are one thing and they can be fine. idle in transaction, usually happens when there is a missing commit and the transaction stays open, delivering all sorts of locking over the long term usually a commit or rollback before the fork should solve the problem. 2015-02-18 23:09 GMT+01:

[web2py] how to use groupby and sum() in query or grid?

2015-02-18 Thread Michael Beller
Given: db.define_table('items', Field('country'), Field('state'), Field(''product'), Field(sales', 'integer') Can you show total sales by country and state? I can groupby in a grid using groupby=db.items.country|db.items.state but I can't find how to include the db.items.sales.s

[web2py] Re: web2py spreadsheet.py - does it use cache.ram correctly?

2015-02-18 Thread chris_g
>From what I can see, the call in the index function works fine, but the problem is in all calls to the callback. Would it work better with a session data instead of cache.ram? On Monday, February 16, 2015 at 4:24:51 PM UTC+11, Massimo Di Pierro wrote: > > I was wrong in saying I was wrong. The

[web2py] Re: if form.process().accepted: workings

2015-02-18 Thread Annet
Thanks you both for your replies. @Niphlod, I did set autodelete=True and the file gets deleted when I delete the entire record, however, when I check the delete checkbox related to the upload field, the file does not get deleted and the field is not to None. I guess the issue is related to: