Re: [web2py] Re: Access remote oracle database

2011-11-25 Thread Humberto Ferreira da Luz Junior
I can access the remote database through SQL Developer and also from my local java applications. My db.py: db = DAL("oracle://user/passw...@server.ip:1521/dese") Then when I try to access the database administration I get the following error: (Failure to connect, tried 5 times: 'NoneType' object

[web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread Gour
On Thu, 24 Nov 2011 20:40:33 +0100 ~redShadow~ wrote: > > Please, take a look at Concrete5. > > I'll have a look at it for knowledge, although for what I understood, > it isn't very distant from Drupal and what is my idea of CMS. Just got 2011 Open Source CMS Market Share Report which says: "C

[web2py] cancel upload, return value

2011-11-25 Thread thodoris
I have a form that has an upload field. The file can be big and i would like to add a cancel button to cancel the upload. If i add a cancel button to the form that for example redirects to 'index' the cancel is stopped but what is the logic behind it. Is some value returned and the form fails?? I

Re: [web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread ~redShadow~
On Fri, 2011-11-25 at 01:03 -0200, Bruno Rocha wrote: > Right now I am developing a Social-CMS. That's cool, btw, I was talking with a friend that is doing some experiments with distributed social networks and was implementing [don't remember the name] protocol connectors for Python, so we agreed

Re: [web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread ~redShadow~
On Thu, 2011-11-24 at 18:08 -0800, Plumo wrote: > an ambitious project! > > > What is your motivation? > I ask because a number of CMS's have been started and then the sole > developer moves on. Would be great if some of these efforts could be > put towards a single killer app. My goals are: *

[web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread Gour
On Fri, 25 Nov 2011 14:29:50 +0100 ~redShadow~ wrote: > * To build a content-management layer on top of web2py, on which to > build pretty much every content-management-related stuff I need, by > just adding modules (as I did with drupal since 2006). +1 > * To have such a thing written in a pow

Re: [web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread ~redShadow~
On Fri, 2011-11-25 at 16:13 +0100, Gour wrote: > You're definitely much more experienced and knowledgeable than myself, > but one of the things, besides in-context editing, which I like in > Concrete5 is that it's dead-simple to convert HTML/CSS design into > native Concrete5 theme...probably (eve

[web2py] Re: My ideas/proposals for the CMS

2011-11-25 Thread newnomad
> My goals are: > * To build a content-management layer on top of web2py, on which to > build pretty much every content-management-related stuff I need, by just > adding modules (as I did with drupal since 2006). > * To have such a thing written in a powerful language such as > **Python**, and not

[web2py] Re:

2011-11-25 Thread Sefa Denizoğlu
?? Wasn't that you? :) On 24 Kasım, 23:17, "massimo.dipie...@gmail.com" wrote: > Who is user web2py on github?From my Android phone on T-Mobile. The first > nationwide 4G network.

[web2py] add key to response.headers for remote app?

2011-11-25 Thread thodoris
What do i have to do in order for a remote app to know that a post of a form was successful? I tried to add a key to response.headers but when i read the response from my app i don't see my key there. Is it correct what i am doing? if form.accepts(request.vars,session): response['headers']['s

[web2py] Re: Access remote oracle database

2011-11-25 Thread Massimo Di Pierro
Looks like web2py cannot find cx_Oracle. At startup, do you see Oracle listed as one of the available database engines? On Nov 25, 4:48 am, Humberto Ferreira da Luz Junior wrote: > I can access the remote database through SQL Developer and also from my > local java applications. > > My db.py: >

[web2py] Re:

2011-11-25 Thread Massimo Di Pierro
No. But I found out. On Nov 25, 10:16 am, Sefa Denizoğlu wrote: > ?? Wasn't that you? :) > > On 24 Kasım, 23:17, "massimo.dipie...@gmail.com" > > > > > > > > wrote: > > Who is user web2py on github?From my Android phone on T-Mobile. The first > > nationwide 4G network.

[web2py] Re:

2011-11-25 Thread Massimo Di Pierro
Clarification. I am user mdipierro and created/own project mdipierro/ web2py. I am not user web2py. On Nov 25, 10:16 am, Sefa Denizoğlu wrote: > ?? Wasn't that you? :) > > On 24 Kasım, 23:17, "massimo.dipie...@gmail.com" > > > > > > > > wrote: > > Who is user web2py on github?From my Android pho

Re: [web2py] Re: Access remote oracle database

2011-11-25 Thread Humberto Ferreira da Luz Junior
No, oracle is not listed at web2py startup. I installed python 2.7 and cx_oracle 5.1.1-10g.win-amd64-py2.7.msi. Should I use an older version? Humberto Ferreira da Luz Junior Mestrado - Ciência da Computação / UEL Analista de Informática - ATI / UEL 2011/11/25 Massimo Di Pierro > Looks like

[web2py] PicklingError: Can't pickle

2011-11-25 Thread Constantine Vasil
I am using GAE models directly: if not request.env.web2py_runtime_gae: ## if NOT running on Google App Engine use SQLite or other DB db = DAL('sqlite://storage.sqlite') auth = Auth(db, hmac_key=Auth.get_or_create_key()) crud, service, plugins = Crud(db), Service(), Plugin

[web2py] Facebook using oAuth2 and Scopes...

2011-11-25 Thread Tito Garrido
Hi Folks, I've been using facebook auth described on the book: http://web2py.com/book/default/chapter/08?search=facebook#Other-Login-Methods-and-Login-Forms Is there a way to increase the scope of the authentication? I'd like to have email and publish streams... I was wondering if using "fbconso

[web2py] Re: issue with form.process in default/user

2011-11-25 Thread Dave
oops, my email reply didn't go to the list either: I noticed that settings.register_onvalidation is a list. Can a person have more than one "onvalidation" in a form.process? On Nov 25, 2:31 am, Massimo Di Pierro wrote: > My answer did not get posted. Trying again... > > auth.settings.register_

[web2py] Re: issue with form.process in default/user

2011-11-25 Thread Dave
Nevermind... I was misreading the code. It's just a bound method. On Nov 25, 1:55 pm, Dave wrote: > oops, my email reply didn't go to the list either: > > I noticed that  settings.register_onvalidation is a list.  Can a > person have more than one "onvalidation" in a form.process? > > On Nov 25

Re: [web2py] Re: Access remote oracle database

2011-11-25 Thread Humberto Ferreira da Luz Junior
I tried python 2.6.6 with cx_oracle 5.1 and I got the same results. The oracle driver is not listed in the web2py console at startup (running from the source). Humberto Ferreira da Luz Junior Mestrado - Ciência da Computação / UEL Analista de Informática - ATI / UEL

[web2py] Error using LOAD in custom module

2011-11-25 Thread monotasker
I'm adapting the select_or_add widget from web2py slices so that it can be packaged as a plugin. In that process I'm moving the business logic from a model file into a custom module. But this line is throwing an error that I can't fix: form_loader_div = DIV(LOAD(c = self.controller, f = self.fu

Re: [web2py] Error using LOAD in custom module

2011-11-25 Thread Bruno Rocha
You can do from gluon import LOAD or in model from gluon import current current.LOAD = LOAD in module from gluon import current LOAD = current.LOAD On Fri, Nov 25, 2011 at 5:15 PM, monotasker wrote: > I'm adapting the select_or_add widget from web2py slices so that it can be > packaged as a

[web2py] Re: Facebook using oAuth2 and Scopes...

2011-11-25 Thread Tito Garrido
I've tried to do: def __init__(self, g): OAuthAccount.__init__(self, g, YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, self.AUTH_URL, self.TOKEN_URL,

[web2py] Re: Facebook using oAuth2 and Scopes...

2011-11-25 Thread Tito Garrido
Looks like self.args=dict(scope='publish_stream,email,user_hometown') works! :) On Fri, Nov 25, 2011 at 5:54 PM, Tito Garrido wrote: > I've tried to do: > def __init__(self, g): > OAuthAccount.__init__(self, g, > YOUR_CLIENT_ID, >

Re: [web2py] Error using LOAD in custom module

2011-11-25 Thread monotasker
Hmmm ... Those don't seem to be working. from gluon import LOAD This doesn't seem to import anything. PyDev tells me that there's an "unresolved import" Still get the 'NoneType not callable' error. from gluon import current LOAD = current.LOAD I get AttributeError: 'thread._local' object has n

[web2py] Show only my contacts

2011-11-25 Thread Renato Ramiro
I have two tables: users and contacts. And i'd like to show only the contacts of that user that it's logged. It's the same with the 'edit profile'. Only I have access to change my informations. How can I implement this? Thanks!

[web2py] Re: add key to response.headers for remote app?

2011-11-25 Thread Anthony
You can use response.headers instead of response['headers']. Maybe try setting the value to a string: response.headers['success'] = 'True' Anthony On Friday, November 25, 2011 11:32:58 AM UTC-5, thodoris wrote: > > What do i have to do in order for a remote app to know that a post of > a form w

[web2py] Differentiating GET from POST

2011-11-25 Thread chandrakant kumar
I'm going through chapter 3 of the book. In an example of 'images' app, in the show function, how is the POST and GET methods differentiated?

Re: [web2py] Error using LOAD in custom module

2011-11-25 Thread Martín Mulone
try something like this from gluon.compileapp import LoadFactory def renderimages(self, page=1, postid=0): """ Render Images """ curvars = {} curvars['page']=page curvars['postid']=postid environment = {} environment['request'] = current.request

[web2py] Re: Access remote oracle database

2011-11-25 Thread Massimo Di Pierro
start python (not web2py) and try import cx_Oracle does it work? If no the problem is with the installation of cx_Oracle. If it works, than make sure you use the same python interpreter with web2py. On Nov 25, 1:11 pm, Humberto Ferreira da Luz Junior wrote: > I tried python 2.6.6 with cx_oracle

[web2py] Re: Differentiating GET from POST

2011-11-25 Thread Massimo Di Pierro
you can check request.env.request_method and request.get_vars vs request.post_vars On Nov 25, 3:26 pm, chandrakant kumar wrote: > I'm going through chapter 3 of the book. In an example of 'images' app, in > the show function, how is the POST and GET methods differentiated?

[web2py] Python port of MailChimp

2011-11-25 Thread Dave
One of my clients uses MailChimp for their email marketing. I'm working on rewriting their online ecommerce site in web2py. I figured I'd share this with the community. "pychimp" is a direct port of the official PHP-based MailChimp API. Method names and expected arguments / return values are id

[web2py] Re: Show only my contacts

2011-11-25 Thread Anthony
The id of the current logged in user is available in auth.user_id (which is None if the user isn't logged in). Does the contacts table have a reference to the auth_user table, like: db.define_table('contacts', Field('user', db.auth_user), ...) If so, the query would be something like: db((db.a

Re: [web2py] Re: Differentiating GET from POST

2011-11-25 Thread chandrakant kumar
I've only been to chapter 3 till now and i'm starting to like it. Best thing i like is the DAL, and the way it is implemented, so sql like syntax, yet database independent. And, the templates so simple. Thank you for such a nice project.

[web2py] Re: Python port of MailChimp

2011-11-25 Thread Massimo Di Pierro
I am interested. On Nov 25, 4:25 pm, Dave wrote: > One of my clients uses MailChimp for their email marketing.  I'm > working on rewriting their online ecommerce site in web2py.  I figured > I'd share this with the community.  "pychimp" is a direct port of the > official PHP-based MailChimp API.

[web2py] Re: Google Authentication on GAE

2011-11-25 Thread howesc
if you want to use google authentication with web2py auth: from gluon.contrib.login_methods.gae_google_account import GaeGoogleAccount auth.settings.login_form=GaeGoogleAccount() form = auth.login(next=URL(r=request, c='default', f='index')) return dict(login_form=form) i *think*

[web2py] Re: GAE Caching and Views

2011-11-25 Thread howesc
hmmm, i've never known GAE to cache selects. at one point i thought the book said as much, now it simply says: "The results of a select are complex, un-pickleable objects; they cannot be stored in a session and cannot be cached in any other way than the one explained here." and i believe that

Re: [web2py] Re: orderby='' on Google App Engine

2011-11-25 Thread howesc
looks like the exception there is because your query has an OR condition in it, which is not supported on GAE. that sort should be in-memory and should work fine.

Re: [web2py] Re: orderby='' on Google App Engine

2011-11-25 Thread Bruno Rocha
On Fri, Nov 25, 2011 at 11:46 PM, howesc wrote: > looks like the exception there is because your query has an OR condition > in it, which is not supported on GAE. that sort should be in-memory and > should work fine. > I found, the error was because of the use of contains() in query -- Brun

Re: [web2py] Re: GAE Caching and Views

2011-11-25 Thread Bruno Rocha
On Tue, Nov 22, 2011 at 8:34 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > . I have never tried it on GAE I have a select cache on my app, works locally, but fails on GAE. It does not raise any exception but does not cache anything, and I only realized it does not works when I see

Re: [web2py] Error using LOAD in custom module

2011-11-25 Thread monotasker
That did it! Thanks Martin. I would never have figured that out on my own. Is it documented anywhere in the book?

Re: [web2py] Re: ImportError with AppEngine SDK v1.6.0

2011-11-25 Thread howesc
it seems that global variables are being preserved across requests, but the override of __builtins__.__import__ is not. see proposed patch here: http://code.google.com/p/web2py/issues/detail?id=537

[web2py] Re: Error using LOAD in custom module

2011-11-25 Thread Massimo Di Pierro
I like Martin's solution. Or shorter: from gluon.compileapp import LoadFactory LOAD = LoadFactory({'request':current.request,'response':current.response}) After this you can do: form_loader_div = DIV(LOAD(c = self.controller, f = self.function, args = add_args, ajax = True), _id = my_select_id +

[web2py] Re: Error using LOAD in custom module

2011-11-25 Thread Anthony
Just submitted an issue: http://code.google.com/p/web2py/issues/detail?id=538 Anthony On Friday, November 25, 2011 11:47:07 PM UTC-5, Massimo Di Pierro wrote: > > I like Martin's solution. Or shorter: > > from gluon.compileapp import LoadFactory > LOAD = > LoadFactory({'request':current.request,

[web2py] Re: Error using LOAD in custom module

2011-11-25 Thread Massimo Di Pierro
I have a possible solution in trunk. Please check it. I do not like the implementation but it not worse than then current implementation of LOAD. In order to make it work I had to store the global execution environment in current.globalenv I think there is room for a lot of cleanup since, once glo

[web2py] Re: ImportError with AppEngine SDK v1.6.0

2011-11-25 Thread Massimo Di Pierro
approved but it would be nice to understad better why this happens. On Nov 25, 9:37 pm, howesc wrote: > it seems that global variables are being preserved across requests, but the > override of __builtins__.__import__ is not.  see proposed patch here: > > http://code.google.com/p/web2py/issues/de