I am getting this error:'cannot set memcache' when using in GAE, what is wrong?
Traceback (most recent call last):
File "/base/data/home/apps/s~*/*/gluon/main.py", line 505, in wsgibase
session._try_store_in_db(request, response)
File "/base/data/home/apps/s~*/*/gluon/gl
Also let me say that I was able to get around this problem - to suit
my purposes, but not those who need ondelete - originally with a hack
to .grid.
In the case in question, i don't really want to delete the item. I
want to remove it for the user in question. To do this, originally, I
added anot
I tried also with python 2.5, but without success.
Importing cx_oracle directly in a python script I got this error:
>>>import cx_Oracle
Traceback (most recent calls last):
File "", line 1, in
ImportError: DLL load failed with error code 193.
I tried installing cx_oracle in my Ubuntu 11.10 an
I know routes.py has been brought up many times, but I haven't been
able to get it to work for me.
Here's what I want to do:
I would like to remove "default" from the URL in
>> localhost/app/default/index
so that it appears as
>> localhost/app/index
I have referenced the posts in google groups an
where can i update the response.headers before form.accepts returns
True?
Because i guess that if i update it after form.accepts returns then
the response has already been sent.
Thodoris
Great!. I didn know of that option. Instead i was switching the string
in the function that handles the field sequence in gluon.dal (wich was
not a good practice). The cause of the error was that sequence name
for PostgreSQL had to be table_table_id_seq and not table_id_seq (for
a table with table_
I think you need json module installed on your system. You are under
windows, linux, ?. In ubuntu linux you can install it from console
doing: apt-get
install python-simplejson
2011/11/27 mikech
> Hi: I downloaded Pyforums in order to study some code in what looks like
> a very well done applic
I've been following the documentation regarding RESTful web services
(very cool), and it mostly works except for one annoying thing. Every
time I try a URL that's supposed to match the whole table and return
all results (e.g. http://127.0.0.1/myapp/default/api/persons.json in
the example) I get an
Is it possible to run something like "acme.127.0.0.1:8000"?
I've already set the common_field, and I want to do other local tests. I
tried a different IP address, and it works but I lose access to the admin
interface.
This is my routes.py
routers = dict(
BASE = dict(
domains = {
I've already set the request_tenant field and each domain can only see the
data they create.
However, from the localhost, I can only see auth_user data, and data
created from localhost. How do I allow access to all data from the
localhost administrators?
Also, how to I allow tenants to access to
I also tried with the x86 python, but I got the same result.
Humberto Ferreira da Luz Junior
Mestrado - Ciência da Computação / UEL
Analista de Informática - ATI / UEL
2011/11/28 Humberto Ferreira da Luz Junior
> I tried also with python 2.5, but without success.
>
> Importing cx_oracle direc
Hi,
Long time no see. Some of you may remember me, I was very active here :)
This is my profile http://experts4solutions.com/e4s/default/expert/21
I am really gratefull for help of Web2py community. Without you, guys, this
wouldn't be possible.
In one sentence: I created a startup using WEB2PY.
A
We use Firefox here and don't have this kind of problem, Bruno.
I put a comment in your first link but it really didn't appear.
Would it be some different way you're submiting this form?
On Mon, Nov 28, 2011 at 5:42 AM, Bruno Rocha wrote:
> Hi,
> I am trying to solve a problem (all day long an
I want to do the following:
I want to add a key to response.headers
response.headers['success']='True'
after a successful file upload and also redirect.
The problem is that i also want to redirect after successful upload
but redirect makes a new reasponse.headers and i lose the key i want
to ad
Does it have to be a response header? How about adding a flag as a URL arg
or var:
redirect(URL('index', vars=dict(success='True')))
If you need to check it on the client side, you can access the query string
in JS via window.location.search. Alternatively, you could have the 'index'
function
No it does not. Your solution is quite clean and of course works.
Thanx a lot!
On Nov 28, 2:37 pm, Anthony wrote:
> Does it have to be a response header? How about adding a flag as a URL arg
> or var:
>
> redirect(URL('index', vars=dict(success='True')))
>
> If you need to check it on the client
Does the problem only happen when using the CKEditor plugin, or even with a
standard textarea?
On Monday, November 28, 2011 2:42:26 AM UTC-5, rochacbruno wrote:
>
> Hi,
>
> I am trying to solve a problem (all day long and I cannot find the source
> of this)
>
> I have a comment form in a page, a
Excellent news Kuba!
On Nov 28, 8:36 pm, Kuba Kucharski wrote:
> Hi,
>
> Long time no see. Some of you may remember me, I was very active here :)
> This is my profilehttp://experts4solutions.com/e4s/default/expert/21
> I am really gratefull for help of Web2py community. Without you, guys, this
>
Nice job. I'll be testing soon. By the way: Is @mobilize documented in the
book? I looked through it briefly but didn't see any mention of it.
I will also be interested to know the solution to this. Ruby on Rails
has pow.cx to symlink .dev domains, which are able to create and use
subdomains for localhost.
Thanks!
On Nov 28, 7:37 pm, Nik Go wrote:
> Is it possible to run something like "acme.127.0.0.1:8000"?
>
> I've already set the c
http://mail.python.org/pipermail/pypy-dev/2011-November/008818.html
I would like to add that other than index function, I wish to map
>> localhost/app/default/any_function
to
>> localhost/app/any_function
Thank you!
On Nov 28, 5:47 pm, lyn2py wrote:
> I know routes.py has been brought up many times, but I haven't been
> able to get it to work for me.
>
> Here's
I figured out what the problem is. in SQLFORM.grid
ret = db(table.id==request.args[-1]).delete()
if ondelete:
return ondelete(table,request.args[-1],ret)
the record is deleted before ondelete is called. This was for
conformity with the oncreate and onupdate
Cool. Note, you should do some testing in IE -- there are some major
display issues.
On Monday, November 28, 2011 7:36:42 AM UTC-5, kuba wrote:
>
> Hi,
>
> Long time no see. Some of you may remember me, I was very active here :)
> This is my profile http://experts4solutions.com/e4s/default/exper
in routes.py
myapps = ['app'] # assuming your app is called "app"
routes_in = [
('/admin/$anything','/admin/$anything'), # do not break admin
]
for app in myapps: routes_in += [ # for everyone of my apps
('/%s/static/$anything' % app,'/%s/static/$anything' % app), # do
not break static ('/%s
or replace
import json
with
import gluon.contrib.simplejson as json
On Nov 28, 4:59 am, Martín Mulone wrote:
> I think you need json module installed on your system. You are under
> windows, linux, ?. In ubuntu linux you can install it from console
> doing: apt-get
> install python-simplejson
Have you tried
http://127.0.0.1/myapp/default/api/person.json
without the "s"
On Nov 28, 5:19 am, Oliver Lade wrote:
> I've been following the documentation regarding RESTful web services
> (very cool), and it mostly works except for one annoying thing. Every
> time I try a URL that's supposed
if condition:
db._request_tenant = 'ignore_tenant'
On Nov 28, 5:39 am, Nik Go wrote:
> I've already set the request_tenant field and each domain can only see the
> data they create.
>
> However, from the localhost, I can only see auth_user data, and data
> created from localhost. How do I all
Look at router.example.py in the /web2py root folder. I think this should
do it:
routers = dict(
BASE = dict(
default_controller = 'default',
default_function = 'index'
)
)
Goes in routes.py, which goes in the /web2py root folder.
Anthony
On Monday, November 28, 2011 9:
This is a cx_Oracle issue. I suggest you contact the author. He may
have a mailing list.
On Nov 28, 4:17 am, Humberto Ferreira da Luz Junior
wrote:
> I tried also with python 2.5, but without success.
>
> Importing cx_oracle directly in a python script I got this error:>>>import
> cx_Oracle
>
>
Anthony's response suggests a better way to solve your problem yet I
can see people wanting to forward headers. This is possible.
redirect(URL(...))
is the same as
raise HTTP(303,location=URL(...))
the named arguments of HTTP are headers so you can do:
raise HTTP(303,location=URL(...)
wow looks great!
On Nov 28, 6:36 am, Kuba Kucharski wrote:
> Hi,
>
> Long time no see. Some of you may remember me, I was very active here :)
> This is my profilehttp://experts4solutions.com/e4s/default/expert/21
> I am really gratefull for help of Web2py community. Without you, guys, this
> woul
yes.
On Nov 28, 8:11 am, Ross Peoples wrote:
> Nice job. I'll be testing soon. By the way: Is @mobilize documented in the
> book? I looked through it briefly but didn't see any mention of it.
No
On Nov 28, 1:48 am, Angelo Compagnucci
wrote:
> Great!
>
> I'll work on it a soon as possible!
>
> Are you using the Auto-initialization of form elements ?
>
> Thanks!
>
> 2011/11/28 Massimo Di Pierro :
>
>
>
>
>
>
>
>
>
> > I could use some help. In trunk there is code for mobile admin.
>
> >
I have a form that has an upload field.
If i add a cancel button to the form that for example redirects to
'index' the cancel is stopped but what if i wanted to cancel the
upload from an app??
I am asking this cause i am uploading a file from an iphone app to the
database but when i cancel that p
Kuba, if you don't mind, can you share how much time you took to build
your website?
On Nov 28, 8:36 pm, Kuba Kucharski wrote:
> Hi,
>
> Long time no see. Some of you may remember me, I was very active here :)
> This is my profilehttp://experts4solutions.com/e4s/default/expert/21
> I am really gr
On Sunday, November 27, 2011 11:24:32 PM UTC-5, Constantine Vasil wrote:
>
> HI Anthony,
>
> Thank you!
>
> This is useful information not available in the book.
>
Well, that specific example isn't in the book, but the use of the 'default'
arg to Field() is documented, and it mentions that it is
This conditional custom HTML seems unnecessary -- why can't you just set
the default value of the field conditionally in the controller?
Field('primary_email_choice', ..., default='Home' if [condition] else
'Work')
Anthony
On Sunday, November 27, 2011 11:52:21 PM UTC-5, Constantine Vasil wrote
Seems to be a problem with the encoding/decoding of multi-part form
data.
The POST source shows:
Content-Type: multipart/form-data;
boundary=---265001916915724
Content-Length: 464
-265001916915724
Content-Disposition: form-data; name="comment_tex
Anybody interested?
Begin forwarded message:
> From: Jesse Noller
> Date: November 28, 2011 8:54:38 AM CST
> To: PSF-Members , pydotorg
> Subject: [PSF-Members] Python.org redesign RFP: Request for Comments
>
> Dear Members/Pydotorg staff:
>
> Attached to this email, and below this message (
>
> For the Wiki Tutorial, In the show(): controller in default.py there
> is the following statement:
>
> db.comment.page_id.default = this_page.id
>
> I can't quite figure out what it means. Are we setting the default
> value of the page_id field for the comment table to be 'this_page.id"?
> How
It happens even if I remove the ckeditor widget.
and happens also on the edit article form.
Denes found the problem but I cant understand why the problem is only with
firefox.
http://zerp.ly/rochacbruno
Em 28/11/2011 13:02, "DenesL" escreveu:
> Seems to be a problem with the encoding/decoding
Thank you very much!
Here's the feedback, I've tried both your suggestions.
Massimo's solution works if there is only default.py. Other controller
routes are not possible.
Anthony's solution is very neat. Although you can't have a controller
going by the name of a function in default.py. I think
You can do it my friend
I have my DNS servers configurated of way that I can use all local
subdomains I need.
http://www.local.web2py.es/
http://sub2.local.web2py.es/
http://acme.local.web2py.es:8000/
Instead 127.0.0.1, I use real subdomains resolved at 127.0.0.1 :P
> ping www.local.web2py.es
>
Are you talking about domains on a remote server?
On 28 nov, 12:39, Nik Go wrote:
> I've already set the request_tenant field and each domain can only see the
> data they create.
>
> However, from the localhost, I can only see auth_user data, and data
> created from localhost. How do I allow acce
Assuming [condition] is evaluated dynamically as the code runs
through SQLFORM.factory
definition, yes, this part will do it.
Field('primary_email_choice', ..., default='Home' if [condition] else
'Work')
But I need custom formatting. Formatting directly in HTML is easier.
> the default can be a lambda function if needed.
That explains it - it would be evaluated dynamically. Yes, this is powerful.
Now question remains about the design side, it seems directly in
HTML is easier, you can see it visually how it would be rendered.
On Monday, November 28, 2011 11:19:52 AM UTC-5, Constantine Vasil wrote:
>
> Now question remains about the design side, it seems directly in
> HTML is easier, you can see it visually how it would be rendered.
>
It's not really display logic, though -- to me it makes more sense for the
controlle
You can do custom formatting without hand-coding all the HTML --
see http://web2py.com/book/default/chapter/07#Custom-forms.
On Monday, November 28, 2011 11:17:44 AM UTC-5, Constantine Vasil wrote:
>
> Assuming [condition] is evaluated dynamically as the code runs
> through SQLFORM.factory
> def
I solved the problem in cx_oracle mailing list.
That was happening because the Oracle Client wasn't installed (I was using
only the SQL Developer to access the remote database).
I installed the oracle client (instantclient-basic-windows.x64-11.2.0.2.0),
set the ORACLE_HOME variable and added it to
Out of curiosity, what is the benefit of having the browser "compile" the
view for display? Web2py's template engine is very fast. I could understand
building the view in Python code (like Pyjamas or Qooxdoo), since they
provide "widgets" that make interacting with an application better. But I
I'm on Windows and the json library is there, but I will take Massimo's
advice and replace it.
Thanks!
Mike
Are you using the Windows binary or the source version with your own Python
installation?
On Monday, November 28, 2011 12:08:04 PM UTC-5, mikech wrote:
>
> I'm on Windows and the json library is there, but I will take Massimo's
> advice and replace it.
>
> Thanks!
>
> Mike
>
I found this thread in archives and I have some thoughts about this
theme.
1) I need only one date field in just one of my tables to use
SQLFORM.widgets.string.widget. All the others, I'd like to use the
widget. How can I do this?
Anyway, I think that if I set db.my_table.my_date_field.widget =
S
On Nov 27, 2011, at 6:57 PM, mikech wrote:
> Hi: I downloaded Pyforums in order to study some code in what looks like a
> very well done application. When I try to look at the default index view I
> get the following error:
>
> Traceback (most recent call last):
> File "gluon/restricted.py"
>> The virtualfield is computed after the select. It cannot be something
you want to select from the db.
The unexpected behaviour is this:
1) I select all the fields and the framework adds the virtual fields for
me.
2) I select some of the fields but the framework does NOT add the virtual
f
I've installed web2py via pip in a virtualenv with the --no-site-
packages option:
virtualenv --no-site-packages env
pip install web2py
which gives me version 1.98.2. I added a VERSION file in the root and
this got web2py running.
I copied admin and my application, which depends on mysql, into
Ideally, you would only need to select the fields actually need to
calculate the virtual fields.
On Monday, November 28, 2011 12:47:48 PM UTC-5, villas wrote:
>
> >> The virtualfield is computed after the select. It cannot be something
> you want to select from the db.
>
> The unexpected behavio
Thanks, this must be it. I'm running under 2.5 using the web2py standard
binary distribution.
Mike
I using the trunk version, GAE. In my models/0.py I have *settings.
email_server = 'gae'.*
When I try to use *request_reset_password *
*on Email send I got: "*Exception: Server address not specified"
The line 327-328: is looking for *settings.server.* if not isinstance(self.*
settings.server*, str
Are you sure you have
from gluon.tools import Mail
mail = Mail()
mail.settings.server = "gae"
??
On Mon, Nov 28, 2011 at 4:27 PM, Constantine Vasil wrote:
> I using the trunk version, GAE. In my models/0.py I have *settings.
> email_server = 'gae'.*
> When I try to use *request_reset_password *
It depends from the development environment. I am working with GAE and it
is very tricky to debug when using GAE.
Controller will be fine for me after I generate the HTML to see what it is
doing.
To understand it how it works we need more examples in the doc.
Before that I need to work with the
I hope this will save time to others wich struggle with setting up
Eclipse+PyDev+GAE SDK, Windows environment and ot be able to step up in *
default.py* with the PyDev debugger.
Using GAE, setting up a development environment is very tricky but I
managed to set it up. That is what I came out wit
if you look at the code at /gluon/tools.py", line 2235, in
request_reset_password it is *settings.server*, not
*mail.settings.server. *Also if set it up in 0.py it is available globally
I suppose?
*
*
The line 327-328: is looking for *settings.server.* if not isinstance(self.*
settings.server*,
Is it possible to have sub-domain in routers?
webapp2 has this capability.
Hi,
We are planning to implement an omegle.com like chatting server. We have
decided to use webpy for the same. Which out of tornado or twisted
framework would be advisable? Is there any other framework especially
suitable for this particular application?
Thanks
Saurabh
Look here: http://code.google.com/p/web2py/source/browse/gluon/tools.py#327
This is inside the Mail.send method:
if not isinstance(self.settings.server, str):
raise Exception('Server address not specified')
it refers as *self.settings.server.* In Python 'self' is the convention to
refer the i
Look http://code.google.com/p/web2py/source/browse/router.example.py#23
domains = { "domain.com" : "app",
"x.domain.com" : "appx",
},
On Mon, Nov 28, 2011 at 5:07 PM, Constantine Vasil wrote:
> Is it possible to have sub-domain in routers?
>
> webapp2 has this
and that is great! we need it in the book!
Probably the name was was changed in trunk, my code used to work in the
stable version.
If I add settings.server = 'gae' in the 0.py, would it be available
globally to Mail()?
On Monday, November 28, 2011 2:31:16 PM UTC-5, Constantine Vasil wrote:
>
> and that is great! we need it in the book!
It's in router.example.py
(http://code.google.com/p/web2py/source/browse/router.example.py), which is
linked directly from the book. But yes, the parameter-based rewrite system
Look into this:
http://code.google.com/p/web2py/source/browse/gluon/contrib/comet_messaging.py
I would go with tornado or gevent. They seems much simpler then
twisted and more in line with the web2py keep-it-simple phylosophy.
Massimo
On Nov 28, 1:06 pm, Saurabh Kumar wrote:
> Hi,
>
> We are
>myapps = ['app'] # assuming your app is called "app"
if my app name is "mycoolapp" it usually is the domain I host it:
mycoolapp.com
so I want to access it like:
mycoolapp.com/contact_us
mycoolapp.com/terms
etc.
How to do that efficiently? I am hard coding the link to redirect to
"default" co
Are you aware of comet_messaging.py
(http://code.google.com/p/web2py/source/browse/gluon/contrib/comet_messaging.py)
-- it uses Tornado? Here's a three part tutorial on using it with Socket.IO
for a chat
application:
http://greg.thehellings.com/2011/04/web2py-websockets-and-socket-io-part-i-b
Thank you Antony - parameter system is what a real world will use so
definitely it needs more examples.
Add default_application = 'mycoolapp' to the BASE router to remove the
appname from the URL.
On Monday, November 28, 2011 2:56:31 PM UTC-5, Constantine Vasil wrote:
>
> >myapps = ['app'] # assuming your app is called "app"
>
> if my app name is "mycoolapp" it usually is the domain I host it:
> my
I know that we can run the source version under 2.7 by specifying the
version at the command line. Is it possible to replace the
Python25.dll in the binary distribution with the 2.7 dll and have it use
this instead? Also where would I find this file?
On Mon, Nov 28, 2011 at 5:34 PM, Constantine Vasil wrote:
> If I add settings.**server = 'gae' in the 0.py, would it be available
> globally to Mail()?
>
No.
every variable defined in models are only global to another models,
controllers and views.
--
Bruno Rocha
[http://rochacbruno.com.br]
I am trying to think it is a problem with web2py session vars in
current.session.
You might find it useful to run web2py in a shell so you can experiment and
see what objects and HTML are generated with forms.
python web2py.py -S myapp/default -M -N
That will start a Python shell in the environment of the default.py
controller of myapp (including running the models). You can
would this do it?
def user():
from gluon.tools import Mail
mail = Mail()
mail.settings.server = "gae"
return dict(form=auth(), auth=auth)
You have two options
def user():
from gluon.tools import Mail
mail = Mail()
mail.settings.server = "gae"
* auth.settings.mailer = mail # needs to bind mail to auth*
return dict(form=auth(), auth=auth)
or in models (or anywhere)
mail=auth.settings.mailer
mail.settings.s
SDK or production environment? how are you calling it? if production, is
it an intermittent failure? (occasionally the memcache service does go
down)
Here is what I do have in *db.py* already:
mail=auth.settings.mailer
mail.settings.server = settings.email_server
are already set up from 0.py where I have:
settings.email_server = 'gae'
so they are already set up.
Please not again that on GAE logs I have this
information which is referring to *
email on GAE:
* note that the sender *must* be an email address that at least has access
to the GAE console. so you must "invite" the sender, even if it is
noreply. check your logs you will see errors if this is your problem.
* in db.py:
mail.settings.server = 'gae' # your SMTP server
mail
No It didn't work - got the same error.
download web2py source distribution and use http://www.py2exe.org/ to
create a web2py for python2/7
I want to place the standard Register form in my front page.
the front page will have a text Join Us, below the standard Register form
plus
the links to Forgot your username? Forgot your password? :
How to do that?
mydomain.com front page:
===
Hi!!
I have 3 computed fields that call a "resize_image" function to make 3
versions of a uploaded image.
The definition of one of these fields:
Field('foto_portada_detalle', 'upload',
uploadfolder=request.folder+'static/uploads/actividades',
compute=lambda r: resize_image(r['foto_portada'], (20
auth.register() produces a registration form -- so you could return that to
the view and use it as is, or use it to generate a custom form layout.
For the other two links, look at the output of auth.navbar() (which is
included in the header of the 'welcome' app).
See http://web2py.com/book/defa
Thanks.
On Nov 28, 7:10 pm, Johann Spies wrote:
> Inhttp://www.web2py.com/book/default/chapter/06?search=form.process
>
> ret = db(query).vaidate_and_update(field='value')
>
> should probably be
>
> ret = db(query).validate_and_update(field='value')
>
> Regards
> Johann
> --
> Because experienc
I think that you can make it through the HOSTS file of your system
127.0.0.1:8000 site1.web2py.local
127.0.0.1:8000 site2.web2py.local
Thank I did it but there is this issue:
Got a message next to
Verify Password: "please input your password again"
How to prevent this and also how to place
"please input your password again" under
Verify Password input field?
To change db backends you need to edit the db.py file and that should do it.
You might try setting auth.settings.formstyle = 'divs'. You can also use
the usual custom form functionality -- the second password field widget is
form.custom.widget.password_two.
Note, I think the auth.register() function does some automatic redirecting
if the user is already logged in, so yo
>make sure the function is called (and therefore the form displayed) only
for non-logged in users.
This I do but the message next to
Verify Password: "please input your password again"
is showing up when the form builds up. It does not
have to show. It seems some code is executed
when showing
It is in GAE production. Things are always different on the cloud.
Everything can go down.
> (occasionally the memcache service does go down)
This confirms it. The issue is big because it happens on Register
or Login form and my users cannot do it.
I use memcache a lot but if it is down there has
Hi Anthony,
Yes I learned the shell system and it is excellent.
But when I added the GAE dependencies it broke up.
There is no way to tell it where google.appengine.ext
is located to use the GAE classes. I spend a lot of time
to figure out but it is not worth partly because via the
browser bigge
bugger projects = bigger projects ;)
(there is a unintentional sublime message here)
but I am using the parameter system which don't has this option.
1 - 100 of 126 matches
Mail list logo