[web2py] Re: Distinguish between session vars that belong to a node.

2012-08-09 Thread Annet
The reason I am asking this: In my node driven application I have amongst others the following stored in > session: > > session.id > session.site_menu > session.hero > session.theme > session.sitenav etc. > All nodes share the same models, views and controllers. At the moment the vars in sessio

[web2py] Distinguish between session vars that belong to a node.

2012-08-09 Thread Annet
In my node driven application I have amongst others the following stored in session: session.id session.site_menu session.hero session.theme session.sitenav etc. I am looking for a way to distinguish between session variables belonging to a node, something like: session.nodeID.id session.nodeI

Re: [web2py] Re: How to keep database connection alive ?

2012-08-09 Thread Amit
Hi, Migrated to MySql from Sqlite and tested the purging feature, its working as intended :) Thanks a lot you guys for assisting me to resolve it :) Regards, Amit On Thu, Aug 9, 2012 at 10:05 AM, Amit wrote: > This is also not working giving same error: "ProgrammingError: Cannot > operate on a

Re: [web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Angelo Compagnucci
Hi Massimo, I'm writing it right now to fix ie issues! Please be patient until fixed! 2012/8/9 Massimo Di Pierro > This may be ok but where do I get bootswatch_ie.css from? > > > On Thursday, 9 August 2012 11:43:28 UTC-5, AngeloC wrote: > >> Hi Massimo, >> >> I think I cannot complete the boots

[web2py] Re: auth.user_group_role() method

2012-08-09 Thread Anthony
I don't think that's the purpose of this method. It appears its only purpose is to provide the user-specific role assigned to each user upon registration, which is only relevant if auth.settings.create_user_groups is set. It might be a good idea if it checked for auth.settings.create_user_group

[web2py] auth.user_group_role() method

2012-08-09 Thread cyan
This method seems to be still in trunk (http://code.google.com/p/web2py/source/browse/gluon/tools.py#2832), as I cannot find it in the latest stable. It takes a user id and return the name/role of the group that user is in. However, it doesn't seem to be able to work with custom groups. For e

[web2py] Re: Initialize one-time configuration data in DB

2012-08-09 Thread mrtn
> If they must be in the database, use a script to import them and run it > once > python web2py.py -S yourapp -M -N -R yourscript.py Yes, the data must be in the db. By 'import them' in the script, do you mean import the database abstraction layer stuff by web2py, and use it to insert the

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
I fixed it. My column names were screwed up. Sorry. On Thursday, August 9, 2012 11:20:31 PM UTC-4, Mike Girard wrote: > > Model: > > db.define_table('movie', > Field('title','string'), > Field('api_id', 'string'), > Field('average_rating', 'double'), > Field('released', 'integer

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
Model: db.define_table('movie', Field('title','string'), Field('api_id', 'string'), Field('average_rating', 'double'), Field('released', 'integer'), Field('mpaa_rating', 'string'), Field('synopsis', 'text'), Field('short_synopsis', 'text'), Field('created', 'datetim

[web2py] Re: Stream a couchdb attachment with web2py

2012-08-09 Thread Daniel Gonzalez
Thanks Massimo, this is working! What I am not able to get is the time-slider to work in the audio element. I guess that since I am streaming the audio file, the browser has no way of knowing the size. Is there a way to solve this problem? Is it possible to send the size of the audio file in t

[web2py] Re: Dynamic Ajax Content and Jquery

2012-08-09 Thread Mike
That did it! You were correct that I had a copy and paste error above. I believe you are also correct that I should have done this with .load() instead. I didn't know there was an ajaxSuccess() handler -- I was struggling to try to get it to work with .live() and .delegate() but your method wo

[web2py] Re: Dynamic Ajax Content and Jquery

2012-08-09 Thread Anthony
Here is your code reformatted: jQuery(".big_search").keyup(function() { ajax('partial_search', ['big_search'], 'search_hint') }); $('.button').button(); }); The call to .button() happens outside the .keyup() callback (unless that was a copy/paste error). Even inside, though, I don't think it w

[web2py] Dynamic Ajax Content and Jquery

2012-08-09 Thread Mike
I guess this is really more of a jquery question but I figured there may be some easier web2py builtin way to do this... I'm doing some custom auto completion on an input field and thought the example from the book made more sense for my usage (as opposed to the built in autocomplete widget). T

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Anthony
Can you show the model and grid code? On Thursday, August 9, 2012 4:00:06 PM UTC-4, Mike Girard wrote: > > Can anyone tell just by looking at this what the problem with the ID and > Star fields might be? The record is actually fine. When I click Edit, > everything is as it should be. > > Sorry

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

2012-08-09 Thread howesc
i had to look up common_filters.based on your experience i would assume that this is being implemented as a query filter rather than getting results from the DB and then filtering them. so what is must be causing in your case is: posts = db((db.posts.id.belongs(post_ids)) & (db.posts.post

[web2py] SQLFORM and Nyromodal

2012-08-09 Thread Christian Espinoza
Hi, I´m have working a custom SQLFORM in update mode, into a modal popup, when I try to submit changes the popup disappear obviously, but it isn't make any changes. But if I try the code out from the modal, it's make the changes without problems... Any Idea? Thanks in advance. Christian. --

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
I guess so, but it's fairly straightforward. Like I said, when I click on the actual record, the movie and star fields are correctly populated. On Thursday, August 9, 2012 4:18:25 PM UTC-4, howesc wrote: > > move_id is None because either the reference does not exist, or the record > it points

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

2012-08-09 Thread spiffytech
I've narrowed the problem down further- the exception is caused by a common_filter attached to my posts table: common_filter = lambda query: db.posts.post_date <= request.now I'm not sure why that would trigger the orderby error, though. Also, is there some significance to limiting the belongs

[web2py] Re: Anybody run web2py apps on GAE in production?

2012-08-09 Thread howesc
i think there are other threads on this (or at least similar) topics. i have multiple live apps on GAE: www.starmakerstudios.com (plus iOS backend services) www.diginn.com www.elizabethscanvas.org they all have *very* different usage profiles and costs. given that i have spend 0 hours doing sys

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

2012-08-09 Thread howesc
the query and the error message do not match. your query has no orderby, yet the error message suggests there is an orderby property set. this confuses me. i do: db(db.table.id.belongs([list of items not more than 30 long])).select() all the time on GAE and it works for me (latest stable web

Re: [web2py] Problems with restful + PUT

2012-08-09 Thread Bruno Rocha
try to replace return dict(GET=GET, POST=POST, PUT=PUT, DELETE=DELETE) withreturn locals() I dont know, but maybe its the problem On Wed, Aug 8, 2012 at 10:49 PM, Tito Garrido wrote: > Hi folks, > > *I have a simple table:* > > *db.define_table('estadio', > Field('cod_estadio','id'), >

[web2py] Re: Web2Py compute fields not working on update

2012-08-09 Thread Deidre
If you look at issue 822 you will see an example of a thumb that works on update. As the comments say, you have to not set writeable to false for the thumb. If you do set writeable to false then compute only works on add not edit or update. So my experience is that compute for images to create a

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread howesc
move_id is None because either the reference does not exist, or the record it points to is represented as "None" star looks to be a Set, or the results of a query. something has gone wrong in the setup of the table or in the representation of that field. On Thursday, August 9, 2012 1:00:06 PM

Re: [web2py] favicon

2012-08-09 Thread Richard Vézina
Gone! Richard On Wed, Aug 8, 2012 at 2:25 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I removed and moved the favicon(s) in the images subfolder. Chan you > please check it? > > > On Wednesday, 8 August 2012 13:14:04 UTC-5, Richard wrote: >> >> Hello, >> >> I read this comment i

[web2py] Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
Can anyone tell just by looking at this what the problem with the ID and Star fields might be? The record is actually fine. When I click Edit, everything is as it should be. Sorry for not providing the full background on this, for brevity's sake. Was wondering if someone can see the problem ju

Re: [web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Yarin Kessler
Thanks Anthony- much clearer On Thu, Aug 9, 2012 at 1:22 PM, Anthony wrote: > On Thursday, August 9, 2012 12:59:13 PM UTC-4, Yarin wrote: >> >> The book doesn't describe the defaults. I think mentioning that cookies >> will be set to the specific URL, args and all, would be helpful. >> > > Note,

[web2py] Re: Table helper functions

2012-08-09 Thread Massimo Di Pierro
This should do it: TR(i.title,XML(" ".join(i.Content.split(" ")[0:25]),A("more",_href=URL(r=request,f='Article',vars=dict(id=i.id Notice the TD are automatic when obvious. On Thursday, 9 August 2012 12:44:19 UTC-5, BlueShadow wrote: > > Hi got a rather complex table which displays databas

[web2py] Table helper functions

2012-08-09 Thread BlueShadow
Hi got a rather complex table which displays database entries in short form with links to the full display of that entry. here is a shortened version of the currently working table I used a for loop to create each row {{=i.Title}}{{=XML( " ".join(i.Content.split(" ")[0:25]) )}}...{{=A("more",_hre

Re: [web2py] Re: web2py on appfog

2012-08-09 Thread Curiouslearn
Hi Mandar, I have tried pythonanywhere. You are right that they are slow. They have been having some problems (there is a post on the forums related to that), which they are fixing. It appears they are also going to move from Apache to nginx server. I hope speeds improve once they have fixed the

[web2py] DAL belongs() fails on App Engine

2012-08-09 Thread spiffytech
I'm trying to use the DAL belongs clause on App Engine and am getting an error. posts = db(db.posts.id.belongs(post_ids)).select(db.posts.ALL, cache=(cache. ram, 60)) Produces: BadArgumentError: First ordering property must be the same as inequality filter property, if specified for this quer

Re: [web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Anthony
On Thursday, August 9, 2012 12:59:13 PM UTC-4, Yarin wrote: > > The book doesn't describe the defaults. I think mentioning that cookies > will be set to the specific URL, args and all, would be helpful. > Note, web2py isn't setting the path at all -- if you don't set a path, there is none. In th

Re: [web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Massimo Di Pierro
The fact is, there is no default. The default is determined by the browser behavior when the cookie has no attributes. On Thursday, 9 August 2012 11:59:13 UTC-5, Yarin wrote: > > The book doesn't describe the defaults. I think mentioning that cookies > will be set to the specific URL, args and a

Re: [web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Massimo Di Pierro
This may be ok but where do I get bootswatch_ie.css from? On Thursday, 9 August 2012 11:43:28 UTC-5, AngeloC wrote: > > Hi Massimo, > > I think I cannot complete the bootstrap/web2py css merging in time for > 2.0, it's really a lot of work and I'm a bit busy these days. > > Btw, i'm fixing the bu

Re: [web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Yarin Kessler
The book doesn't describe the defaults. I think mentioning that cookies will be set to the specific URL, args and all, would be helpful. On Thu, Aug 9, 2012 at 12:30 PM, Anthony wrote: > To me a default where apps share cookies doesn't seem out of with line >> with the other things apps share- t

[web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Massimo Di Pierro
I think others should share their view on this but I will add my two cents (not sure very web2py specific). Most of the best projects I have seen in web2py are written by small teams (same goes for most open source web apps I have seen in my life). In web2py there is an order in which you do th

Re: [web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Angelo Compagnucci
Hi Massimo, I think I cannot complete the bootstrap/web2py css merging in time for 2.0, it's really a lot of work and I'm a bit busy these days. Btw, i'm fixing the bug I introduced with issue 896 and I want to share a thought with you. Actually, there is no way to maintain a mobile first approa

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread vinicius...@gmail.com
Luc, I don't see that. Web2py allows your team to work colaboratively. We work this way in our company. By the way, I'd say some characteristics enforce this separation. In Django, for example, you must have your routes planned and templates coded to allow programmers to work. Without them,

[web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Anthony
> > To me a default where apps share cookies doesn't seem out of with line > with the other things apps share- the default logger for example. Cookies are for end-user functionality; the logger is for development/debugging. For the most part, the apps don't share anything. > Just as making

[web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Luc Chase
Must admit site is funny; I almost bought the t-shirt. I don't mean to imply any particular methodology (even though I do tend to favour evolutionary, functional prototyping methods hence my interest in Web2py). I'm more interested in how larger web dev projects are affected (or not) by the i

[web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Yarin
Good point- I just looked at what i was trying to do and session is really all i need, don't know why I thought differently.. On Thursday, August 9, 2012 11:45:46 AM UTC-4, Massimo Di Pierro wrote: > > The point is... why use cookies al all when there is an app-level session? > If you use cooki

[web2py] Re: Web2Py compute fields not working on update

2012-08-09 Thread Brandon Reynolds
Has anyone found a way to fix this yet? Or is there a thumbnail module out now? Like django's http://djangothumbnails.com/ Brandon On Monday, June 18, 2012 10:24:05 AM UTC-6, Brandon Reynolds wrote: > > I have this problem when i try to generate thumbnails. If the field is > empty it inserts t

[web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Massimo Di Pierro
The point is... why use cookies al all when there is an app-level session? If you use cookies it may be because you want to do something that canot be done with sessions. Adding a prefix would get in the way of some possible uses. On Thursday, 9 August 2012 10:40:01 UTC-5, Yarin wrote: > > To m

[web2py] Table Inheritance (Was Re: KeyError : 'name' when inserting/updating via sqlform.grid)

2012-08-09 Thread Mandar Vaze
I figured out that problem is due to the way I have defined Table Inheritance for mother/father/child. If I define fields name and description *directly* in the mother/father/child tables, inserts/updates work OK. Now the question is : What is wrong with the way I've defined the tables ? Here i

[web2py] Re: Cookie chaos- please see this example

2012-08-09 Thread Yarin
To me a default where apps share cookies doesn't seem out of with line with the other things apps share- the default logger for example. Just as making an app-specific logger can be achieved by passing request.application to a new instance, so we can prefix app-specific cookies with the app name

Re: [web2py] Re: LinkedIn not working? - Am I importing the wrong library?

2012-08-09 Thread Alec Taylor
Okay, using the version not from git and installing it both with "pip install python-linkedin" and placing the "helper.py", "linkedin.py" and "model.py" in the "web2py\gluon\contrib\login_methods" directory left me with the aforementioned error: "linkedin module not found" Eventually after a lot

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Bruno Rocha
+1 Great words Massimo! its the best conclusion of Programming-Motherfucker method! :) Em 09/08/2012 10:48, "Massimo Di Pierro" escreveu: > Listen everybody. This thread is hilarious but not very professional. > > I think most of the people on this thread are hardcore programmers and > most of u

[web2py] Problem with Field display in SQLForm.Smartgrid

2012-08-09 Thread Mike Girard
Hello: I am building a movie database site with web2py. I have a movies table which has a many-to-many relationship with several other items: stars, directors and genres. I am using a SQLForm.Smartgrid declared in my controller like so: def manage_movies(): grid = SQLFORM.smartgrid(db.mov

[web2py] Re: LinkedIn not working? - Am I importing the wrong library?

2012-08-09 Thread Alec Taylor
I have also now tried with http://code.google.com/p/python-linkedin/, but that gave me the " No module named gluon.contrib.login_methods.linkedin_account" error. To debug, I tried following the guide on their Google Code page, and was able to get an error: >>> from linkedin import helper T

Re: [web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Alec Taylor
It would be good to have OAuth working for web2py 2 Facebook and LinkedIn still have some issues LinkedIn: https://groups.google.com/forum/#!topic/web2py/SbnQEnXEcOg Facebook: (will add bug report once I've gotten LinkedIn login to work) On Thu, Aug 9, 2012 at 11:25 PM, Massimo Di Pierro wrote

Re: [web2py] Re: web2py 2.0 almost done

2012-08-09 Thread lyn2py
I see. I understand it now. Thanks Anthony On Wednesday, August 8, 2012 9:37:51 PM UTC+8, Anthony wrote: > > On Wednesday, August 8, 2012 5:30:10 AM UTC-4, lyn2py wrote: >> >> Does this mean that if I uncomment the jquery-ui in layout.html, the >> autocomplete will be working even on IE? >> > > N

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Richard Vézina
Really funny post Bruno! Agree mostly with Massimo, let's good programmer roll! :) Richard On Thu, Aug 9, 2012 at 9:56 AM, vinicius...@gmail.com wrote: > I Agree. Good words. > > > > On 08/09/2012 10:48 AM, Massimo Di Pierro wrote: > >> Listen everybody. This thread is hilarious but not very

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread vinicius...@gmail.com
I Agree. Good words. On 08/09/2012 10:48 AM, Massimo Di Pierro wrote: Listen everybody. This thread is hilarious but not very professional. I think most of the people on this thread are hardcore programmers and most of us came to some conclusions: 1) it is not the idea that has value, it is th

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Massimo Di Pierro
Listen everybody. This thread is hilarious but not very professional. I think most of the people on this thread are hardcore programmers and most of us came to some conclusions: 1) it is not the idea that has value, it is the execution 2) the success of a project is strongly correlated with the s

[web2py] Re: Stream a couchdb attachment with web2py

2012-08-09 Thread Massimo Di Pierro
http://www.myserver.com/.../track06.mp3> ')}}" preload="auto"> def getme(): import urllib response.headers['Content-Type'] = 'audio/mp3' filename = ''+request.args(0) # fix this! return response.stream(urllib.urlopen(filename)) On Thursday, 9 August 2012 03:54:43 UTC-5, Dani

[web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Massimo Di Pierro
Can you help us fix the CSS? On Thursday, 9 August 2012 00:29:58 UTC-5, Andrew wrote: > > Just a note on IE7 navbar behaviour: > > The Menu has taken a turn for the worse: > Initially the Welcome App Sub Menus dissapeared in : "welcome css pathc, > issue 896, thanks Angelo" > They then returned

Re: [web2py] web2py 2.0 almost done

2012-08-09 Thread Massimo Di Pierro
The corruption, as we could determine has to do with two issues: - SOCKET_TIMEOUT = 1 was too slow, we increased it to 10. - self.conn.sendall was timing out but socket.timeout was not being caught. Now it is. Since this fix we had no more reports of data corruption. Are there other problems tha

Re: [web2py] web2py 2.0 almost done

2012-08-09 Thread Marin Pranjić
What about issues with rocket, is that fixed? (if I remember correctly it was about corruption of big-sized downloads) On Tue, Aug 7, 2012 at 6:33 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Web2py 2.0 is almost done. > Please try the nightly build. > Let us know if it breaks an

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Vasile Ermicioi
> > >>> That is how I am used to work: >>> http://programming-**motherfucker.com/ >> >> LOL Our ValuesThey Claim To ValueThey Really ValueWe Fucking DoIndividuals and interactions*Tons of billable hours**Programming, Motherfucker*Working software*Tons of poin

[web2py] Re: web2py not reading Amazon SNS Subscription Confirmation requests?

2012-08-09 Thread Osman Masood
Thanks Massimo! It worked. request.body.read() had the JSON. On Thursday, August 9, 2012 9:42:05 AM UTC+8, Massimo Di Pierro wrote: > > There is nothing in request.args because I assume the URL is called > without args. > There is nothing in request.vars because the request contains no HTTP > va

Re: [web2py] Redirect to requested function

2012-08-09 Thread Annet
Hi Jonathan, Thanks for your reply. If you can identify your front-end functions, why not just rewrite > request.{controller,function} here? > > if request.args(0) != session.id: > request.controller = 'addressbook' > request.function = 'router' > Because the router determines, what

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread Osman Masood
Rocha, your post inspires me... On Thursday, August 9, 2012 9:44:38 AM UTC+8, Massimo Di Pierro wrote: > > LOL > > On Wednesday, 8 August 2012 20:17:33 UTC-5, rochacbruno wrote: >> >> >> That is how I am used to work: http://programming-motherfucker.com/ > > --

[web2py] Anybody run web2py apps on GAE in production?

2012-08-09 Thread Alexei Vinidiktov
Hi, If you run a web2py powered app on GAE in production, could you share your experiences? Is it very expensive for your needs? Are you OK with the pricing? How many instances do you run simultaneously on average? What kind of traffic do you get? How many requests per second do your apps serv

[web2py] Stream a couchdb attachment with web2py

2012-08-09 Thread Daniel Gonzalez
Hello, I have some sound files in a couchdb database (not related to web2py). My web2py application has access to this database, and I want to stream the sound files so that they can be listened with the HTML audio tag, like this: http://www.myserver.com/.../track06.mp3"; preload="auto"> I am

[web2py] Re: web2py 2.0 almost done

2012-08-09 Thread Luc Chase
Should it not, as a matter of principle, try to maintain mutual accuracy of data? Or at least give the option do so. So, if the same data is updated where-ever, the system should aim for a cascade update, or the next best thing to that. -- Luc. On Wednesday, 8 August 2012 22:17:17 UTC+1, Mas

[web2py] Re: web2py hosting

2012-08-09 Thread Mandar Vaze
fluxflex has gone away. We had an app hosted there. June 30th 2012 was their last day of operation. On Wednesday, September 14, 2011 4:10:53 AM UTC+5:30, monotasker wrote: > > I've been working on fluxflex for a couple of weeks now and really like > it. There are a couple of odd things, though,