[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
Are you sure? I searched on this list and seemed that there had been some problems. In light of this I installed lxml in my 2.5 site-packages and ran web2py with the python2.5 command recommended on the installation page. Can someone confirm what Python version is best for running web2py as of

[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread pbreit
Web2py runs fine (better?) on 2.6 and 2.7. --

[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
Yes, I was using the web2py binary. I have since opted to run from source and it works with one stipulation: Your instructions say to run from source use python2.5. lxml is installed in 2.6 on my machine. Running from source with python rather than python2.5 seems to be fine and the module not

[web2py] Re: NoSQL Question Again!!!

2012-08-12 Thread Massimo Di Pierro
We think web2py supports mongo well but we need more people to help testing it. We will mention in the 2.0 release as experimental because of lack of testers. On Friday, 10 August 2012 11:16:30 UTC-5, gm01 wrote: > > Has there been any update with DAL supporting Mongo? I haven't seen any > "o

[web2py] Re: autoincremente field with a specific first value

2012-08-12 Thread Massimo Di Pierro
Do you mean something like this? db(query).update(field = db.table.field+value) On Friday, 10 August 2012 10:46:54 UTC-5, tigmmi wrote: > > Is there a way to add an autoincremente field with a specific first value. > Compute won't work with id + number. --

Re: [web2py] Re: GAE Cloud SQL local dev server problem

2012-08-12 Thread Massimo Di Pierro
Can you try replace self.folder = folder or '$HOME/'+thread.folder.split('/applications/',1)[1] with self.folder = thread.folder.split('/applications/',1)[1] On Wednesday, 8 August 2012 18:11:04 UTC-5, Alexei Vinidiktov wrote: > > Ok. I've managed to connect to MySQL from GAE local dev serv

Re: [web2py] Re: Electronic voting anybody?

2012-08-12 Thread Massimo Di Pierro
Nice. Is this posted somewhere or private? On Sunday, 12 August 2012 08:15:09 UTC-5, Ramos wrote: > > i have a phone voting system with web2py and asterisk > > http://www.youtube.com/watch?v=vCNoAyKN86o > > > > 2012/8/12 Alan Etkin > > >> I like it. I'd consider as a new feature (if not implemente

[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread Massimo Di Pierro
Are you using the web2[y binary distribution. It will not work with the osx distribiution which comes with its own python/ On Sunday, 12 August 2012 22:39:56 UTC-5, Mike Girard wrote: > > I am attempting to use lxml in my app. I am using Mac OS X. I placed the > lxml files in web2py/Content/Res

[web2py] Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
I am attempting to use lxml in my app. I am using Mac OS X. I placed the lxml files in web2py/Content/Resources/applications//modules. I attempted to import lxml into default.py with this: from lxml import etree I am getting a module-not-found error. I anticipated problems because lxml req

[web2py] Re: DAL belongs() fails on App Engine

2012-08-12 Thread spiffytech
Yes, I've verified that this can be done. The below query works in the App Engine Datastore Viewer (note that it only worked once I manually created the index in index.yaml and deployed it; web2py did not automatically create the appropriate index: SELECT * FROM posts WHERE __key__ IN (KEY('pos

[web2py] Re: Janrain redirects successfully, but I'm not logged in?

2012-08-12 Thread Cliff Kachinske
Google Chrome SSL error. Server identified itself as *.rhcloud.com not giantpicnic.com Needless to say I did not go there. On Sunday, August 12, 2012 2:53:38 PM UTC-4, Alec Taylor wrote: > > After I click the login with facebook with Janrain I am redirected to my > page. > > Here is the respons

[web2py] Re: NoneType object is not callable error when returning Storage type from controller

2012-08-12 Thread Anthony
What you return from your function does not get passed to the view. Rather, if your function returns a dict, then the items in the dict are added to the global environment available to the view. If you want to create a storage object and pass it to the view, then the storage object should be an

[web2py] NoneType object is not callable error when returning Storage type from controller

2012-08-12 Thread Jaymin Oh
def show_event(): event_id = request.vars['event_id'] event_record = db.event(event_id) # Check if event exists if not event_record: raise HTTP(400, 'No event found') # Check if it's member return Storage(event=event_record.as_dict(

[web2py] Re: DAL belongs() fails on App Engine

2012-08-12 Thread Anthony
How would you do the query in GQL? Have you confirmed that it can be done? Anthony On Sunday, August 12, 2012 9:23:39 PM UTC-4, spiffytech wrote: > > I tested with your suggested orderby, but the outcome was the same. > > I tested with the query as you wrote it below, with no common_filter, and

Re: [web2py] Re: authentification,registration fails

2012-08-12 Thread Anthony
On Sunday, August 12, 2012 5:23:05 PM UTC-4, Michele Comitini wrote: > > Is your session dir too full? Make sure it gets cleaned periodically from > old session pickles. > I'm not sure that's the problem. On regular requests, the same session cookie gets passed back and forth, but when an Auth f

[web2py] Re: DAL belongs() fails on App Engine

2012-08-12 Thread Anthony
> > Also, is there some significance to limiting the belongs lists to 30 items? > >From Google: *Note:* The IN and != operators use multiple queries behind the scenes. For example, the IN operator executes a separate underlying datastore query for every item in the list. The entities returned

Re: [web2py] Re: Appengine CPU cycles

2012-08-12 Thread Anthony
> > I have only made very little tests on gae, but I could clearly see that > web2py was too heavy to be profitable on gae, > it just consumes too much resources, running models.py on every request > looks like a crazy thing to me.. > Which is why this discussion has largely been about ways to

[web2py] Re: Triggering LOAD

2012-08-12 Thread Anthony
Note, {{=LOAD('default','myaction', ajax=True)}} is just a helper that produces the following HTML: loading... So, you can trigger a component loading in a div by manually calling the web2py_component() function in the brow

Re: [web2py] Re: Appengine CPU cycles

2012-08-12 Thread Khalil KHAMLICHI
I have only made very little tests on gae, but I could clearly see that web2py was too heavy to be profitable on gae, it just consumes too much resources, running models.py on every request looks like a crazy thing to me.. --

[web2py] Re: DAL belongs() fails on App Engine

2012-08-12 Thread spiffytech
I tested with your suggested orderby, but the outcome was the same. I tested with the query as you wrote it below, with no common_filter, and the query still failed. Since that's a pretty straightforward query that should work, this seems like a bug to me, so I filed a web2py bug report: http:/

[web2py] Connecting with database that has tables in it

2012-08-12 Thread pbreit
In order to use DAL query syntax, you have to define the tables. --

Re: [web2py] Triggering LOAD

2012-08-12 Thread Bruno Rocha
/views/default/index.html Click to load content1 Click to load content2 Click to load content3 Click to load content4 $(function () { $('.load_content').on('click', function (e) { elem = $(this); url = elem.attr("data-url"); target = elem.attr("data-target

Re: [web2py] Re: Electronic voting anybody?

2012-08-12 Thread Khalil KHAMLICHI
Asterisk is a telephony platform that works incredibly well, its a bit intimidating for starters but once you find out that there are mainly only two important files : extensions.conf, sip.conf to make it work things become clearer. On Mon, Aug 13, 2012 at 12:43 AM, Changju wrote: > Hi Ramos. >

[web2py] Re: Triggering LOAD

2012-08-12 Thread Alan Etkin
Hi Is it possible to trigger the LOAD component when a user clicks on something, or can it only be used when a page is first loaded? I have been using the ajax function to do this but would prefer the extra flexibility of LOAD if it is possible. web2py.js comes with this function: web2py_compon

Re: [web2py] Re: Electronic voting anybody?

2012-08-12 Thread Changju
Hi Ramos. Asterisk is really interesting to me. I'd like to know more about Asterisk. What would it be good for beginner for understanding Asterisk? (I had already read the articles on the Asterisk but I didn't get big picture of Asterisk.) And could you explain how your phone voting system works

Re: [web2py] Re: web2py 2.0 almost done

2012-08-12 Thread Andrew
IE7 is looking "normal" ! Great work Angelo. Thanks. On Saturday, August 11, 2012 3:11:39 AM UTC+12, AngeloC wrote: > > Hi Massimo, > > I fixed compatibility with IE and reverted to a non mobile first approach. > I reverted because bootstrap is not mobile first (so we add too little) and > fo

[web2py] Re: Trouble with pickling session

2012-08-12 Thread Web2py Mostly Newbie
On Monday, August 13, 2012 12:35:05 AM UTC+10, Anthony wrote: > > Are you able to pickle the object outside of web2py (i.e., is the object > generally pickleable, but fails only in web2py)? > > Didn't occur to me, but have now tested it - Yes, I can pickle it with the re.finditer line. --

[web2py] Re: Scheduler: help us test it while learning

2012-08-12 Thread Niphlod
Uhm, serializing part of the output to the table every n seconds - with the output being a stream - would require a buffer/read/flush to update the scheduler_run table that I'm not sure it's feasible: I'll look into that but ATM I'm more concerned with other small issues of the Scheduler. I'll d

Re: [web2py] Re: authentification,registration fails

2012-08-12 Thread Michele Comitini
Is your session dir too full? Make sure it gets cleaned periodically from old session pickles. mic Il giorno 12/ago/2012 20:08, "Anthony" ha scritto: > Any changes to the server software or configuration? > > On Sunday, August 12, 2012 1:33:38 PM UTC-4, ctrlSoft wrote: >> >> version is 1.99.7,

Re: [web2py] Connecting with database that has tables in it

2012-08-12 Thread Anthony
I think the newer extract_pgsql_models.pymight be a little better, and it can be tweaked to work with other db's. Note, if you have defined the models already in one app and simply want to access them from a differen

Re: [web2py] Re: Requiring password on registration

2012-08-12 Thread Yarin Kessler
Grazie On Sun, Aug 12, 2012 at 12:09 PM, Anthony wrote: > Note, this has now been fixed in trunk: > http://code.google.com/p/web2py/source/detail?r=73b2137eb32e61abc47b491786643d46c199 > > > On Saturday, August 11, 2012 11:21:12 PM UTC-4, Anthony wrote: >> >> Looks like a bug in the wizard:

Re: [web2py] Connecting with database that has tables in it

2012-08-12 Thread Khalil KHAMLICHI
I once had to do the same, I created all the tables in my db.py with option : migrate=False. a tedious task but with the DAL syntax it took only a few minutes, when finised it worked like a charm (although I was on Windows) On Sun, Aug 12, 2012 at 6:46 PM, Bruno Rocha wrote: > That feature

[web2py] Re: Electronic voting anybody?

2012-08-12 Thread Massimo Di Pierro
Cannot be done without keeping some link between voter and vote and that is what this app tries hard to avoid by ensuring complete anonymity even if the database were to be stolen. On Sunday, 12 August 2012 08:00:12 UTC-5, Alan Etkin wrote: > > I like it. I'd consider as a new feature (if not i

[web2py] Janrain redirects successfully, but I'm not logged in?

2012-08-12 Thread Alec Taylor
After I click the login with facebook with Janrain I am redirected to my page. Here is the response as an HAR file (Google Chrome): http://pastebin.com/62pj90Ku [with hashes slightly modified to prevent abuse] Feel free to attempt to login yourself at http://giantpicnic.com What am I doing wro

Re: [web2py] Re: Janrain fails (yes I did RTFM!) — too many values to unpack

2012-08-12 Thread Alec Taylor
Thanks, got it to work (well; beat that error anyway). Forgot to run a git add on the relevant files. On Sun, Aug 12, 2012 at 4:27 AM, Anthony wrote: > According to the ticket, the problem is with your janrain.key file. The code > does a split on ":" and expects two values -- if it's complaining

Re: [web2py] Connecting with database that has tables in it

2012-08-12 Thread Bruno Rocha
That feature exists only for Mysql and Postgres under scripts/extract_mysql_models.py You can try to rewrite this for SQLserver, or you can use db.executesql("RAW SQL") *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacb

Re: [web2py] Random Records From Database

2012-08-12 Thread Bruno Rocha
db(db.table).select(orderby="") # does not works on GAE *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacbruno.com.br Blog: web2py routes Get a signature like this.

Re: [web2py] trouble ... call a model and a module by the same name?

2012-08-12 Thread Bruno Rocha
No problem! Thats how plugins works models/plugin_foo.py modules/plugin_foo.py *Bruno Cezar Rocha** - @rochacbruno* rochacbr...@gmail.com | Mobile: +55 (11) 99210-8821 www.CursoDePython.com.br | www.rochacbruno.com.br Blog: web2py routes Get a sig

[web2py] Connecting with database that has tables in it

2012-08-12 Thread Hassan Alnatour
Dear ALL , I have a database that is running under Microsoft SQL server , i want to connect to that database and use its tables , but i dont want to define any tables in my db.py , how can i do that ? Best Regards, --

[web2py] Random Records From Database

2012-08-12 Thread Hassan Alnatour
Dear ALL, How Can i get random records for a database table ? Best Regards, --

[web2py] Re: Electronic voting anybody?

2012-08-12 Thread Christopher Steel
I really like this app Massimo. I will see if I have some time to play around with it this week. Very nice, C. On Friday, August 10, 2012 5:24:10 PM UTC-4, Massimo Di Pierro wrote: > > Demo service: > >https://tests.web2py.com/evote/default/index > > Source: > >https://github.com/mdipie

Re: [web2py] Re: Giving a talk promoting web2py over Django

2012-08-12 Thread Alec Taylor
Hi gm, they're mostly just things promoting my project; but happy to share. http://goo.gl/gnyWP On Sat, Aug 11, 2012 at 1:27 AM, gm01 wrote: > Love to see your slides you presented. Are they available somewhere on > line? > Thanks, > gm > > > On Wednesday, August 1, 2012 11:46:48 AM UTC-4, Alec

[web2py] Re: trouble ... call a model and a module by the same name?

2012-08-12 Thread Anthony
I don't think so. Have you tried it? On Sunday, August 12, 2012 1:11:05 PM UTC-4, weheh wrote: > > Am I going to get myself into big trouble if I call a model and a module > by the same name? --

[web2py] Re: authentification,registration fails

2012-08-12 Thread Anthony
Any changes to the server software or configuration? On Sunday, August 12, 2012 1:33:38 PM UTC-4, ctrlSoft wrote: > > version is 1.99.7, i have 10 websites (10 apps in applications/ folder) > in 4 from its, i periodicaly make chages, but i dont think that code from > one application can affect

[web2py] Re: authentification,registration fails

2012-08-12 Thread ctrlSoft
version is 1.99.7, i have 10 websites (10 apps in applications/ folder) in 4 from its, i periodicaly make chages, but i dont think that code from one application can affect all applications. in web2py code i didn't made any changes or upgrades. --

[web2py] SQLFORM.grid: export csv/tsv, but only without hidden fields

2012-08-12 Thread Martin Weissenboeck
Hi, nice feature to select cvs, htm, tcs when exporting from sqlform.grid. But how to turn off the options "csv (hidden fields)" and "tsv (hidden fields)" - I do not want my users to see all hidden fields. Regards, Martin --

[web2py] trouble ... call a model and a module by the same name?

2012-08-12 Thread weheh
Am I going to get myself into big trouble if I call a model and a module by the same name? --

[web2py] Record versioning in web2py 2.0

2012-08-12 Thread apps in tables
Hi, The feature of record versioning is very important to know the history of the record. is it possible to go back and forward (in the history)? is it possible to merge two histories of the same (logical data), and end up with one record ? is it possible to have an offline application that w

[web2py] Re: Requiring password on registration

2012-08-12 Thread Anthony
Note, this has now been fixed in trunk: http://code.google.com/p/web2py/source/detail?r=73b2137eb32e61abc47b491786643d46c199 On Saturday, August 11, 2012 11:21:12 PM UTC-4, Anthony wrote: > > Looks like a bug in the wizard: > > db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key

[web2py] Re: AttributeError: 'Rows' object has no attribute 'append'

2012-08-12 Thread Annet
Hi Anthony, Thanks for your reply. Problem solved! This information is top secret, so please don't tell anyone. ;-) > My lips are sealed ;-) Best regards, Annet. --

[web2py] Re: Store DB connection information in private/ folder

2012-08-12 Thread lyn2py
You could create a any_name.py file in the private folder and then import the file into your model db.py On Saturday, August 11, 2012 6:26:52 AM UTC+8, Gian Luca Decurtins wrote: > > Hi all > > How do I store the DB connection information (db = DAL(...)) in the > private/ folder? > > I would lik

[web2py] Re: authentification,registration fails

2012-08-12 Thread Massimo Di Pierro
Which version are you running? was the change caused by a change of your code or an upgrade? On Sunday, 12 August 2012 05:56:10 UTC-5, ctrlSoft wrote: > > hi, my web2py app is hosted on webfaction. everything worked fine. about 3 > weeks ago authentification,registration stopped working. first i

[web2py] Re: authentification,registration fails

2012-08-12 Thread Anthony
The problem appears to be with the session. When the form is submitted, the session cookies is sent with the request, but for some reason, web2py is creating a new session on the server instead of using the existing session (it's sending back a new session cookie with the response). web2py uses

Re: [web2py] Re: Appengine CPU cycles

2012-08-12 Thread Felipe Meirelles
Just a last update about the tests, my overall application cost (in dolars from appengine) droped 25% with the change, so, at least in appengine lazy models are a must. On Wednesday, August 8, 2012 12:24:37 PM UTC-3, Jonathan Lundell wrote: > > On 8 Aug 2012, at 7:59 AM, Massimo Di Pierro > >

Re: [web2py] Re: GAE datastore: how to unindex a field?

2012-08-12 Thread Felipe Meirelles
Just reviving this topic. Its not setable via index.yaml. On Wednesday, May 16, 2012 1:07:10 PM UTC-3, howesc wrote: > > actually the question at hand here i think is whether or not web2py can > support indexed=False in the property constructor when defining GAE > models: > > https://developers

[web2py] Re: AttributeError: 'Rows' object has no attribute 'append'

2012-08-12 Thread Anthony
Instead of rows.append(morerows), you can do: rows &= morerows rows1 & rows2 will append rows2 to rows1, and rows1 | rows2 does the same but removes from rows2 any duplicates of rows that appear in rows1. In addition to & and |, you can also use &= and |=, as in the above example. This informa

[web2py] Re: Trouble with pickling session

2012-08-12 Thread Anthony
Are you able to pickle the object outside of web2py (i.e., is the object generally pickleable, but fails only in web2py)? http://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled Anthony On Sunday, August 12, 2012 9:59:15 AM UTC-4, Web2py Mostly Newbie wrote: > > Replaced me

[web2py] Re: onaccept vs next (auth.register)

2012-08-12 Thread Anthony
On Sunday, August 12, 2012 9:51:20 AM UTC-4, lyn2py wrote: > > Thanks Alan, on > > > will "next" overwrite "onaccept" > > I meant to use onaccept as a redirect to another form. > Will the redirect in "next" overwrite onaccept's redirect? > The call to onaccept happens before the redirect to "next

[web2py] Re: Trouble with pickling session

2012-08-12 Thread Web2py Mostly Newbie
Replaced method by: def initNewLines(self): self.newlines = [] for i in range(len(self.raw)): if self.raw[i:i+1]=='\n': self.newlines.append(i) And no more complaints from web2py. Would like to know what the problem is though. --

[web2py] Re: onaccept vs next (auth.register)

2012-08-12 Thread lyn2py
Thanks Alan, on > will "next" overwrite "onaccept" I meant to use onaccept as a redirect to another form. Will the redirect in "next" overwrite onaccept's redirect? On Sunday, August 12, 2012 8:22:05 PM UTC+8, Alan Etkin wrote: > > > May I know what is the difference between the two? > > Not su

Re: [web2py] Re: Electronic voting anybody?

2012-08-12 Thread António Ramos
i have a phone voting system with web2py and asterisk http://www.youtube.com/watch?v=vCNoAyKN86o 2012/8/12 Alan Etkin > I like it. I'd consider as a new feature (if not implemented yet) the > option of submitting a new vote replacing the previous before deadline. > > El viernes, 10 de agosto

[web2py] Re: Electronic voting anybody?

2012-08-12 Thread Alan Etkin
I like it. I'd consider as a new feature (if not implemented yet) the option of submitting a new vote replacing the previous before deadline. El viernes, 10 de agosto de 2012 18:24:10 UTC-3, Massimo Di Pierro escribió: > > Demo service: > >https://tests.web2py.com/evote/default/index > > Sour

[web2py] Re: AttributeError: 'Rows' object has no attribute 'append'

2012-08-12 Thread Alan Etkin
> > When I comment out row.append(row) and return rows and morerows rows > contains 3 records and morerows 5. Why doesn't this work? > > If you want a unified Rows class instance to be handled by the action view, I think that you need a complete db query as input before calling .select, because

Re: [web2py] 500 Error at http://www.web2py.org/

2012-08-12 Thread Marin Pranjić
According to web.archive.org: http://web.archive.org/web/20100829120211/http://www.web2py.org/ It just redirects to web2py.com Marin On Sun, Aug 12, 2012 at 2:24 PM, Bruno Rocha wrote: > I never knew about web2py.org (what is that? is it a web2py foundation > web site?) > > -- > > > > --

Re: [web2py] 500 Error at http://www.web2py.org/

2012-08-12 Thread Bruno Rocha
I never knew about web2py.org (what is that? is it a web2py foundation web site?) --

[web2py] Re: onaccept vs next (auth.register)

2012-08-12 Thread Alan Etkin
> May I know what is the difference between the two? Not sure in this case, but for crud, *onaccept* is "... *a function* to be called after the form submission is accepted and acted upon, but before redirection. ...", and *next* is "...*the URL*to redirect to after success ..." > will "next" o

Re: [web2py] 500 Error at http://www.web2py.org/

2012-08-12 Thread Marin Pranjić
You can use http://web2py.com/ Marin On Sun, Aug 12, 2012 at 1:50 PM, Terrence Brannon wrote: > this needs to be fixed pronto. > > -- > > > > --

[web2py] 500 Error at http://www.web2py.org/

2012-08-12 Thread Terrence Brannon
this needs to be fixed pronto. --

[web2py] Re: Requiring password on registration

2012-08-12 Thread Yarin
db.auth_user.password.requires.insert(0,IS_LENGTH(minsize=5)) did not fix it on it's own, but db.auth_user.password.requires = CRYPT(key=auth.settings.hmac_key,min_length =4) did fix it. Thanks a lot for your help. On Saturday, August 11, 2012 11:42:35 PM UTC-4, Anthony wrote: > > Note also that i

[web2py] Re: Trouble with pickling session

2012-08-12 Thread Web2py Newbie
It seems to be caused by the presence of: nlIter = re.finditer('\n',self.raw) in one of the methods of one of the class methods. So, I moved the work to a separate function (not method): def initNewLines(self): self.newLines = findNewLines(self.raw) def findNewLines( searchIn):

[web2py] authentification,registration fails

2012-08-12 Thread ctrlSoft
hi, my web2py app is hosted on webfaction. everything worked fine. about 3 weeks ago authentification,registration stopped working. first in chrome not worked after a few days in firefox http://agsystem.md/welcome/default/user/register?_next=/welcome/default/index does anybody has the sam

[web2py] onaccept vs next (auth.register)

2012-08-12 Thread lyn2py
Hi, I want to customize the user registration, and encountered "onaccept" vs "next". 1. May I know what is the difference between the two? 2. I want the user to be redirected to another form upon *successful*registration (and logged in), will "next" overwrite "onaccept"? Thanks! --