[web2py] Ref: Calling SQLFORM in modal passing an ID

2013-04-22 Thread Teddy Nyambe
How possible is it to call an SQLFORM in a Twitter bootstrap modal, where a pressed button passes an ID loading specific data. Tried using LOAD() with no success. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this gro

Re: [web2py][share] usage_statistics

2013-04-22 Thread guruyaya
The idea seems extremly unefficiant. Wouldn't it make more sense to build it from logs, on a seperate machine? On Tuesday, April 23, 2013 1:08:02 AM UTC+3, Richard wrote: > > Hello, > > I want to share this little snippet : > > # MODEL > > # Statistics of utilisation > db.define_table('usage_sta

[web2py] enable sidebar in scaffolding apps

2013-04-22 Thread 黄祥
hi folks, i've enabled sidebar in my views, but there is something i want to ask about globals() e.g. {{left_sidebar_enabled=True}} {{block left_sidebar}} {{include 'default/left_sidebar.html'}} {{end}} will produce the same output with : {{left_sidebar_enabled=False,globals()}} {{block left_

[web2py] Upgrade from 2.2.1 to 2.4.6 breaks requests library??

2013-04-22 Thread Yarin
Our application makes use of the Python requestslibrary to post http requests. As soon as we upgraded from 2.2.1 to 2.4.6 we started getting errors. Trace: File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/request

[web2py] Re: Alternative to SQLFORM for Angular

2013-04-22 Thread Anthony
> > I have looked in the gluon/validators.py but I have not been able to > follow how the form object is used to process the returned variables. I got > as far as seeing a traverse method being called but didn't see how that > called the individual validation methods. The HTML form helpers (

[web2py] Re: How hide comments column (w2p_fc) from SQLFORM.grid() when edit some record

2013-04-22 Thread 黄祥
i think you can achieve it by some conditional in models or controller. e.g. db.define_table('test', Field('test'), Field('test_read'), Field('test_write'), format='%(test)s') *# not show in edit page* show_test_write = request.args(-3) == 'edit' db.test.test_write.writable = db.t

Re: [web2py][share] usage_statistics

2013-04-22 Thread Anthony
It would probably make more sense to do the inserts in the model or controller. Also, no need to call db.commit(), unless you want to count the visit even if there is an error later in the request. Anthony On Monday, April 22, 2013 6:08:02 PM UTC-4, Richard wrote: > > Hello, > > I want to share

[web2py] Re: time field format doesn't work when edit

2013-04-22 Thread Anthony
Input format is not controlled by the represent attribute. If you are using web2py_ajax.html and web2py.js, then time fields are controlled by the jQuery Time Entry plugin (it is included in the calendar.js file that comes with web2py). There are instructi

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
The problem is that we made a change so that no session file is created at all if this is a new session and the session remains empty. So, when the index page is requested, no session file is created. Next, the form1 Ajax request comes in, and because there is no session file, there is nothing t

[web2py] Re: Can somebody hack a user tracker and download counter for us ?

2013-04-22 Thread smoggy
Just publishing the solution I've found for download counting. It uses the already available google analytics code and i just pasted the code in the first link into the end of the layout.html . How to track downloads with google analytics: http://www.blastam.com/blog/index.php/2013/03/how-to-trac

Re: [web2py] time field format doesn't work when edit

2013-04-22 Thread Richard Vézina
It should work as far as I can see... Are you sure you look at the right field, because only start has represent in the model definition you show us. Richard On Mon, Apr 22, 2013 at 6:16 PM, Christian Espinoza wrote: > Hi, I have this table definition: > > > db.define_table('timetable', >

[web2py] time field format doesn't work when edit

2013-04-22 Thread Christian Espinoza
Hi, I have this table definition: db.define_table('timetable', Field('customer', db.customer, label='Cliente'), Field('name', length=160, label='Nombre'), Field('start', 'time', label='Inicio' ), Field('finish', 'time', label='Final' ),

[web2py][share] usage_statistics

2013-04-22 Thread Richard
Hello, I want to share this little snippet : # MODEL # Statistics of utilisation db.define_table('usage_statistics', Field('time_stamp','datetime', default=request.now), Field('client_ip','string', default=request.client), Field('user_id', 'reference auth_user', default=auth.user and

Re: [web2py] Log delete event?

2013-04-22 Thread Richard Vézina
Any idea? Richard On Fri, Apr 19, 2013 at 1:46 AM, Richard wrote: > Hello, > > How may I log a delete event? > > form.process(ondelete=myeventlogcall) > > ? > > It is not clear in the book if this work for SQLFORM. It seems to work for > SQLFORM.grig and Crud, but there is no particular explana

[web2py] Re: calling custom_store and custom_retrieve using parameters

2013-04-22 Thread James Burke
Hello again, What does the autodelete function use to locate files? I seem to have broken mine. Cheers, -James On Thursday, April 11, 2013 12:01:11 PM UTC+12, James Burke wrote: > > Here's what I came up with. Perhaps not such a great solution, because it > pigeon holes my download function.

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
umpf I can't understand why this is not working "ok". The problem lies indeed in the fact that one ajax request overwrites the session, if the session file is not there yet. I can only guess that the logic is failing to acquire a lock before creating the (new) file If a request has

[web2py] Re: Alternative to SQLFORM for Angular

2013-04-22 Thread RHC
Thanks for that Alan. Yes I realise that the server creates the form for the clientapi, my wording was not very good. The as_json() and as_dict() methods looks useful, but still generates the HTML component for the various inputs which I would then have to pull the relevant information out of.

Re: [web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Michele Comitini
you are right. I forgot about the argument! session.forget(response) in 0.py under models 2013/4/22 Derek > from what I read, session.forget() just makes sure sessions are not > written to disk at the end of the request. session.forget(response) > actually unlocks the session also, so multipl

[web2py] Re: jquery 2.0

2013-04-22 Thread Niphlod
and ship 2 jquery.js AND require.js, and require that every plugin is made requirejs compatible (and that every jquery plugin needs to be 2.0 compatible if IE > 8) ??? waaay too bloated and restrictive. On Monday, April 22, 2013 9:19:53 PM UTC+2, Derek wrote: > > I'd like to see it as a co

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
ok, behaviour confirmed on my pc too. PS: noticed that with def index(): session.hello = 'world' return dict() all works fine, every time. I'm debugging right now to see what's going on on the 2 ajax requests. On Monday, April 22, 2013 7:22:46 PM UTC+2, Neil wrote: > > I've been doing

[web2py] Re: auth.settings.extra_fields - do not show on registration?

2013-04-22 Thread Niphlod
you have to do it checking request.args(0) in the function that provides auth() usually it's the def user() inside default.py something like def user(): if request.args(0) == 'register': db.table.field.writable = db.table.field.readable = False . return dict

[web2py] Re: jquery 2.0

2013-04-22 Thread Derek
I'd like to see it as a conditional load. if browser version > IE8 then load it. However, I think it would be cool to add requirejs to the default scaffolding. On Friday, April 19, 2013 6:43:22 AM UTC-7, Massimo Di Pierro wrote: > > it is out > > http://blog.jquery.com/2013/04/18/jquery-2-0-rele

[web2py] Re: anybody installed areyouahuman in web2py?

2013-04-22 Thread Derek
seems pretty poorly written. Their demo doesn't even work and generates multiple javascript errors on my pc. On Saturday, April 20, 2013 3:12:10 AM UTC-7, ad...@egasolineras.com wrote: > Ok, happy you like it. But my question was how to install it in web2py. > > My steps: > > - copy the ayah.py

[web2py] Re: gluon.main not part of Windows installation

2013-04-22 Thread Derek
http://effbot.org/pyfaq/what-is-init-py-used-for.htm and there are _init__.py files, so you are correct... On Monday, April 22, 2013 12:06:21 PM UTC-7, Derek wrote: > > *dots within the name of an imported module do in fact indicate a > hierarchy of directories* > > I thought it only did that i

[web2py] Re: gluon.main not part of Windows installation

2013-04-22 Thread Derek
*dots within the name of an imported module do in fact indicate a hierarchy of directories* I thought it only did that if there was an __init__.py... On Sunday, April 21, 2013 12:04:22 PM UTC-7, Anthony wrote: > > Although web2py is generally easy to use and set up, it does assume some > knowle

[web2py] Re: @cache decorator

2013-04-22 Thread Derek
Yes, that was my question. If it doesn't include the time, then it should work fine. On Thursday, April 18, 2013 11:59:53 AM UTC-7, Anthony wrote: > > Note, the cache doesn't do anything to clear out old items, so if you > change the key every day, the previous day's page will still remain in th

[web2py] Re: db select with rows

2013-04-22 Thread Derek
That does make it a list... temp = [x for x in db(db.tableB.id ==row.id).select()] would be more pythonic, no? On Sunday, April 21, 2013 1:58:51 AM UTC-7, Paolo valleri wrote: > > You get the last element simply because in the loop you have an > assignment. So that you will

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Derek
Option A is the best option, B is second best. I recommended a change in Rocket since it's included in w2py (it would be a nice enhancement), and since this is an internal site and Vincent may not be a webserver guy, that may fit the bill more. On Monday, April 22, 2013 11:35:23 AM UTC-7, Miche

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread BlueShadow
I chose to disable WAL which seems to work. I had not a lot of time to test it I just commented my try: except Blog which enabled WAL in the test app. I will do some further testing tomorrow. Thanks Ricardo I got the newest version of python 2 so I guess I have to wait for python 2.7.5 and hope

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Michele Comitini
a. Use a full blown webserver like apache or nginx and configure it to gzip content on client request b. Use a simple wsgi gzipping filter. For b. there is a simple and fast enough filter in wsgitools package. You can use it in anyserver.py or any place when calling the wsgi application as: from

Re: [web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Derek
from what I read, session.forget() just makes sure sessions are not written to disk at the end of the request. session.forget(response) actually unlocks the session also, so multiple requests can be made at the same time. On Monday, April 22, 2013 11:13:40 AM UTC-7, Michele Comitini wrote: > > s

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 7:04 PM, BlueShadow wrote: > now I got pysqlite (on my windows maschine) which has following versions > In [6] : import pysqlite2.dbapi2 > In [7] : print pysqlite2.dbapi2.version > 2.6.3 > In [8] : print pysqlite2.dbapi2.sqlite_version > 3.7.6.2 > > but I don't know how to

[web2py] How hide comments column (w2p_fc) from SQLFORM.grid() when edit some record

2013-04-22 Thread Christian Espinoza
Hi guys, somebody know how hide the comments column at a edit form using SQLFORM.grid() ?? I can do it using jquery with: $("tr td:nth-child(3)").each(function(){this.remove()}); But 'm finding a server side(controllers maybe) way to do it.. Id: 1 Cliente: Intsercom Ltda Nombre: Velocida

Re: [web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Michele Comitini
session.forget() in a model called 0.py is best for this type of tests Il giorno 22/apr/2013 19:59, "Derek" ha scritto: > here you go: > 1 - db migration is enabled, you should only migrate once and unless you > modify your model, you should disable migration. This is generally a > deployment st

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread BlueShadow
now I got pysqlite (on my windows maschine) which has following versions In [6] : import pysqlite2.dbapi2 In [7] : print pysqlite2.dbapi2.version 2.6.3 In [8] : print pysqlite2.dbapi2.sqlite_version 3.7.6.2 but I don't know how to update sqlite3 -- --- You received this message because you ar

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 6:49 PM, BlueShadow wrote: > windows pc: > > import sqlite3 > In [2] : print sqlite3.version > 2.6.0 > In [3] : print sqlite3.sqlite_version > 3.6.21 > > Linux > > import sqlite3 > In [5] : print sqlite3.version > 2.6.0 > In [6] : print sqlite3.sqlite_version > 3.7.9 if y

[web2py] Re: The Great Web Framework Shootout

2013-04-22 Thread Derek
here you go: 1 - db migration is enabled, you should only migrate once and unless you modify your model, you should disable migration. This is generally a deployment step. It would hurt the performance of DAL, which is exactly what we're seeing in these benchmarks. 2 - no caching is enabled.

[web2py] Re: response.files strange behaviour?

2013-04-22 Thread Loïc
Right! Thank you Niphlod Le lundi 22 avril 2013 16:49:58 UTC+2, Niphlod a écrit : > > you most certainly have somewhere > response.optimize_js = 'inline' > response.optimize_css = 'inline' > > in your models > > http://web2py.com/books/default/chapter/29/04?search=minify > > On Monday, April

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread BlueShadow
windows pc: import sqlite3 In [2] : print sqlite3.version 2.6.0 In [3] : print sqlite3.sqlite_version 3.6.21 Linux import sqlite3 In [5] : print sqlite3.version 2.6.0 In [6] : print sqlite3.sqlite_version 3.7.9 on neither maschine is pysqlite2 installed. So I will try to upd

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Derek
Unless you are using IE lower than 5.5, all clients support gzip. Looks like 'Rocket' doesn't though. You could modify the 'write' on line 1758 to gzip files though. Just have to set the content-length and content-encoding yourself. You could add in a check to see if it's supported... if 'gzip

[web2py] auth.settings.extra_fields - do not show on registration?

2013-04-22 Thread Dragan Matic
Is it possible to add extra fields into auth and not have them shown/asked on the registration page but only on the user settings page? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emai

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
I've been doing a little debugging. When the page loads, _try_store_in_file(self, request, response) in globals.py is called twice. The first time it saves formname1, and the second time it seems to overwrite the original file with formname2 (occasionally the order is reversed). How would a loc

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
I put a demo here: http://78.46.172.53:8000/w2pchat/default/index users/pass us...@demo.com / 1234 us...@demo.com / 1234 You can create other users to. Later tonight I will put it down. Ricardo On Mon, Apr 22, 2013 at 5:47 PM, Ricardo Pedroso wrote: > Do you managed to get it working? > >

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
If you are saving sessions in files, the session file should be locked by each request, so there shouldn't be any race conditions. However, if you are saving sessions in the db, you could get race conditions (e.g., both Ajax requests read the same empty session, then form1 saves its session wit

Re: [web2py] web2py chat example

2013-04-22 Thread Ricardo Pedroso
Do you managed to get it working? Ricardo On Mon, Apr 22, 2013 at 2:56 PM, Ovidio Marinho wrote: > Complementing: for instalations packages for windows 64 bit´s go to > http://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent and downloads also > greenlet. > > > > > Ovidio Marinho Falcao Neto

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 1:28 AM, Vincent wrote: > Hi Ricardo, > > in this case I do control the clients. The scientific data would be on an > intranet and would only really make sense to the a specialized client. > > So apart from having appropriate headers I just need to write the json.dumps > an

Re: [web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Ricardo Pedroso
On Mon, Apr 22, 2013 at 2:23 PM, Anthony wrote: > On Monday, April 22, 2013 8:53:39 AM UTC-4, BlueShadow wrote: >> So I changed that. Now I get the next error: >> >> file is encrypted or is not a database I think this may be a problem with sqlite versions. On both system, in a python shell do:

[web2py] 'DAL' object has no attribute 'auth_user'

2013-04-22 Thread funmanhk
Hi All, While i am trying to use the social plugin suggested by Massimo, i ran into another question. I clicked on the db admin, and try to see what I got for the Auth db. I didn't see it created, but read that it should be in the scaffolding by default. I visited this page - http://127.0.0.1:

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Good thought, but that doesn't seem to be a factor since it works in incognito after the first submit, and I can reproduce in regular mode. For some reason, on initial page load it is not saving both formkeys. Is it possible that there is a conflict when saving the the sessions file? i.e. both

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Niphlod
completely "out-of-side" observation (I'll make sure I get this tested once I get home to report the behaviour on my pc) are you sure that your "incognito-mode" browser accepts cookies ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gro

[web2py] Re: Form for a db-table, that belongs to currently logged in user

2013-04-22 Thread Philipp Müller
That does the trick. Thank you very much! :) Am Montag, 22. April 2013 17:25:43 UTC+2 schrieb Niphlod: > > if the owner can have 0>n pets, you need to show him a list of his pets, > optionally letting him adding a pet to his list. > The "form" in this context is a rather limited representation: u

[web2py] Re: Form for a db-table, that belongs to currently logged in user

2013-04-22 Thread Niphlod
if the owner can have 0>n pets, you need to show him a list of his pets, optionally letting him adding a pet to his list. The "form" in this context is a rather limited representation: usually you'd want to display a form for insert/edit/delete for each pet but you can't use a form for "listing"

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
A little more progress - I can now predict when the problem will occur server side, before hitting submit. This is what I do: 1) clear all my web2py session files 2) open an incognito brower 3) go to the page with multiple ajax forms 4) take a look at the new session file. If it looks like this:

[web2py] Form for a db-table, that belongs to currently logged in user

2013-04-22 Thread Philipp Müller
Hello, I would like to create a form using > form = SQLFORM(db.pet) where db.pet belongs to db.owner. This form is supposed to provide the owner (which is going to log in to the site) with the information about their (and only their) pets and let them edit this information. Any help on how

[web2py] Re: response.files strange behaviour?

2013-04-22 Thread Niphlod
you most certainly have somewhere response.optimize_js = 'inline' response.optimize_css = 'inline' in your models http://web2py.com/books/default/chapter/29/04?search=minify On Monday, April 22, 2013 4:34:46 PM UTC+2, Loïc wrote: > > Hello All, > > *Welcome *app, in "*layout.html*" line 41

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Good suggestion - I think we may be getting somewhere. When it fails, the server is getting a '_formkey[formname2]' when submitting form 1. I'll try to dig a little deeper. On Monday, 22 April 2013 15:26:03 UTC+1, Anthony wrote: > > Not sure what's going on. In the browser, maybe use the develop

[web2py] response.files strange behaviour?

2013-04-22 Thread Loïc
Hello All, *Welcome *app, in "*layout.html*" line 41 : {{ response.files.append(URL('static','css/web2py.css')) response.files.append(URL('static','css/bootstrap.min.css')) response.files.append(URL('static','css/bootstrap-responsive.min.css')) response.files.append(URL('static','css

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
Not sure what's going on. In the browser, maybe use the developer tools to confirm what is being sent (i.e., session cookie, value of the hidden _formkey field). On the server, check that there is a "_formkey[formname1]" key in the session and that it matches the _formkey value submitted with t

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
My first submit failed on Mac (both Chrome and Safari). However, I can't get it to happen on Ubuntu. I can now reproduce in the following situations: - running web2py locally and remote - 2 server OSs (windows & linux) - 2 webservers (rocket & uwgsi/nginx) - 2 front-end OSs (windows

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-22 Thread Massimo Di Pierro
The default works as long as you have only one DB, else it may randomly connect to one of the available and exhibit weird behavior. On Monday, 22 April 2013 08:08:57 UTC-5, Vixus wrote: > > Ok, fixed after changing name to 'HEROKU_POSTGRESQL_AQUA_URL' > > On Monday, April 22, 2013 3:53:57 AM UTC+

[web2py] Re: Interesting points...

2013-04-22 Thread Massimo Di Pierro
1. Not relevant for web2py. The file structure is enforced by the framework 2. There is a web2py-celery but needs work. There is also the built-in web2py scheduler. In many situation it is sufficient. And it is in the box. celery pro: faster communication between master and workers schedul

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Wow, really! That's really frustrating... Nope, I never tried clearing cookies and then submitting. I always clear my history, shut down the browser, restart the browser, copy the URL, and then the first submit (sometimes) fails. What else about my system could lead to this behavior? I'm goin

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
> > 1) go to http://www.ai-therapy.com/ajax_test/ 2) enter something in Form 1, and press submit > 3) did it work *the first time*? (the second, and subsequent, submit > usually works for me) > 4) if I clear the cookies and restart the browser, the first submit fails > about 50% of the time. >

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Just to clarify, I used the "new simple application" option with trunk (I didn't copy over the app from a previous version). Just to be 100% sure I also copied the web2py.js and web2py_ajax.html files over from the welcome app with no success. On Monday, 22 April 2013 14:53:28 UTC+1, Neil wrote

Re: [web2py] web2py chat example

2013-04-22 Thread Ovidio Marinho
Complementing: for instalations packages for windows 64 bit´s go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent and downloads also greenlet. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
I didn't upgrade - when I ran locally I downloaded trunk from github and used that version with rocket. Same problem. On Monday, 22 April 2013 14:47:14 UTC+1, Anthony wrote: > > >> web2py.js is inside your app (in /appname/static/js), so it does not get > updated when you upgrade web2py. When yo

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
> > 1) I don't think I'm using an old web2py.js, unless it is accidentally > being packaged with the latest source. web2py.js is inside your app (in /appname/static/js), so it does not get updated when you upgrade web2py. When you upgrade web2py, you have to manually copy the new version of w

Re: [web2py] web2py chat example

2013-04-22 Thread Ovidio Marinho
Resolved ok! ok got hit with .msi. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi 83 9336 3782 - Claro Brasil 2013/4/22 Niphlod > if you're on windows use the .

[web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Anthony
On Monday, April 22, 2013 8:53:39 AM UTC-4, BlueShadow wrote: > so I found the error causing this error: " 'exceptions.AttributeError'> type object 'datetime.datetime' has no > attribute 'datetime'" > I had in my db.py from datetime import datetime and in one of my modules > I had import datetim

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Note: it is still frustratingly unpredictable. I followed my own instructions 10 times before it happened again... On Monday, 22 April 2013 14:10:33 UTC+1, Neil wrote: > > 1) go to http://www.ai-therapy.com/ajax_test/ > 2) enter something in Form 1, and press submit > 3) did it work *the first ti

Re: [web2py] web2py chat example

2013-04-22 Thread Niphlod
if you're on windows use the .exe installers On Monday, April 22, 2013 3:08:52 PM UTC+2, Ovidio Marinho wrote: > > Error install pip gevent > > c:\Python27\Scripts>pip install gevent > Downloading/unpacking gevent > Running setup.py egg_info for package gevent > Please provide path to l

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
This is turning out to be an elusive one! Notes: 1) I don't think I'm using an old web2py.js, unless it is accidentally being packaged with the latest source. 2) weheh: Nope, no uploading involved - all the code is above. 3) I guessed it is related to the multiple forms issue since the behavior

Re: [web2py] web2py chat example

2013-04-22 Thread Ovidio Marinho
Error install pip gevent c:\Python27\Scripts>pip install gevent Downloading/unpacking gevent Running setup.py egg_info for package gevent Please provide path to libevent source with --libevent DIR Complete output from command python setup.py egg_info: Please provide path to libevent

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-22 Thread Vixus
Ok, fixed after changing name to 'HEROKU_POSTGRESQL_AQUA_URL' On Monday, April 22, 2013 3:53:57 AM UTC+1, Massimo Di Pierro wrote: > > Can you explain what you experience? Get a ticket? Data is not inserted? > Data is inserted and disappears? > Do you have more than one database? > > Have you tri

[web2py] Re: gluon.main not part of Windows installation

2013-04-22 Thread mkerins
Thanks Anthony - that did the trick. Admonishment duly noted On Sunday, April 21, 2013 2:12:43 AM UTC-4, mke...@halstead.com wrote: > > I'm trying to run my web2py app behind Apache on Windows, however, when > Apache loads wsgihandler.py and tries to execute the line: > > import gluon.main >

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-22 Thread Vixus
No tickets. Nothing in the postgres log or web2py log. Looking at heroku pg:info, I see that none of the tables are even being created.. On Monday, April 22, 2013 3:53:57 AM UTC+1, Massimo Di Pierro wrote: > > Can you explain what you experience? Get a ticket? Data is not inserted? > Data is i

[web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread BlueShadow
so I found the error causing this error: " type object 'datetime.datetime' has no attribute 'datetime'" I had in my db.py from datetime import datetime and in one of my modules I had import datetime (and accordingly I used datetime.now() inside the app and datetime.datetime.now() in the module).

Re: [web2py] web2py chat example

2013-04-22 Thread Ovidio Marinho
Hello Ricardo, How does it work? if I want to implement an application in which how should I proceed with the service, use apache or Tornado, what it does (python-anyserver.py gevent), more details to use this chat application please. thanks. Ovidio Marinho Falcao Neto

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread weheh
I've done this before -- multiple ajax forms on one page -- and not had any issues. EXCEPT, I'm guessing from the names of your functions that you have an "upload" type field in there somewhere, or possibly in both forms. That is going to be an issue, since upload fields have to be treated speci

[web2py] Re: app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-22 Thread Anthony
If you can pack a minimal app that reproduces the problem, I can try it on Windows. On Monday, April 22, 2013 2:44:10 AM UTC-4, BlueShadow wrote: > > Sorry for that I meant > > import datetime > print datetime.datetime.now() > > I was typing faster than I could think. this throws the error.

Re: [web2py] Re: Old DAL bug (?) ValueError: invalid literal for int() with base 10: 'AssetTypes\\Character.png'

2013-04-22 Thread Arnon Marcus
Ok, good to here. Any changes to the dal.py that might reflect upon the way our current db.py is interpreted? We are using PostgreSQL 9.1 x64 with the latest psycopg. Has anything changed, say, in "group_by", or "order_by" or any of the data-types, or any of the "require"s ? On Mon, Apr 22, 2013

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Anthony
I had already tried something similar, and now I have tried your exact code, and I cannot reproduce the problem (running from trunk with Rocket on Windows 7). Is it possible you are using an old version of web2py.js? I've been playing around with it a bit more, and it seems to be the same > und

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
I've been playing around with it a bit more, and it seems to be the same underlying problem that Anthony described above. The question is: why doesn't the formname fix work for ajax components? On Monday, 22 April 2013 09:19:06 UTC+1, Neil wrote: > > Thanks for that. Unfortunately, there seems t

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-22 Thread Neil
Thanks for that. Unfortunately, there seems to be a little more to it. He is a minimal example (using web2py 2.4.6/rocket/windows, although the behavior is the same with other configurations). controllers/default.py: def index(): return dict() def f1(): val1 = "" form1 = FORM('For

[web2py] Re: Natural or default surrogate key; what is the speed difference?

2013-04-22 Thread Niphlod
test it. There's no way anyone can reply to your question without a db backend, a data model, the cardinality of your tables and the queries you'll most likely do. In any case, a unique-integer-serial is most of the times the "less expensive" way to hook up tables by references (indexes and "poi

Re: [web2py] Interesting points...

2013-04-22 Thread Niphlod
In my pov: 1. the applications/myapp/ dir is less complicated than a django project 2. you have the internal scheduler, python-rq and celery to choose from 3. up to you, web2py is ready to use many webservers through anyserver.py 7. I prefer something else but supervisord is useful in any case 8. v

Re: [web2py] Interesting points...

2013-04-22 Thread joseph simpson
Excellent question.. I am looking at starting a similar type of site... The DAL makes database selection less of an issue... But need some type of graph database in the mix.. More complex examples would be nice... On Sun, Apr 21, 2013 at 11:52 PM, Jason (spot) Brower wrote: > How we we fit