Hi,
I'd like to embed a map in a view, and am trying to use plugin_wiki.
I have plugin_wiki installed, and when I use a simpler function, like the
YouTube example: -
{{=plugin_wiki.widget('youtube',code='l7AWnfFRc7g')}}
...all is well.
However, if I try to embed a map, I get a ticket with:
Dear all,
occasionally, I am getting this error too (with and without lazy_table)
Which OS are you using ?
Could you post your db model?
Paolo
On Monday, September 17, 2012 7:21:42 AM UTC+2, mweissen wrote:
I have read some threads about this error message - I got it too:
Version web2py™
Check following:
a) linux is case sensitife on files - check filenames and their references
in web2py
b) check correct os level permissions on files ... so web2py can see read
them ...
Dne pondělí, 17. září 2012 6:01:09 UTC+2 Vladimir Makarov napsal(a):
I use different controller files:
+
From the /var/log/apache2/error.log:
[Mon Sep 17 09:39:09 2012] [error] ERROR:web2py:Traceback (most recent call
last):
[Mon Sep 17 09:39:09 2012] [error] File
/users/www-data/web2py/gluon/main.py, line 547, in wsgibase
[Mon Sep 17 09:39:09 2012] [error] session._try_store_on_disk(request,
Debugging web2py web apps under WING IDE for me is quite slow because each
resource (.js, .css) is loaded individually and quite slowly on each
request.
I noticed the latest Microsoft .NET MVC 4.0 has resource bundling built-in
to Visual Studio 2012 and it is automatic.
I have researched
Just add an argument cid=None to SQLTABLE.__init__
and change line 2408-9
from
row.append(TH(A(headers.get(c, c),
_href=th_link+'?orderby=' + c)))
to
row.append(TH(A(headers.get(c, c),
I changed a postgres table to add a field
Field('dq',boolean', default=False, readable=False, writable=False),
I may have made another postgres table change at the same time.
Later, I set the values of mytable.dq to False throughout the db.
Subsequently, when querying the value of dq for a row
I have a plugin_wiki and I want to have active pages. Let's look at the
page meta-menu (but it is the same for all other pages):
(1) A screenshot of http://127.0.0.1:8000/init/plugin_wiki/index pages
meta-menu is not active
System PagesCurrent Pagesmeta-menuMeta menu
When user password is incorrect I am getting this
*File /home/www-data/web2py/gluon/validators.py in __eq__ at line 2596*
código argumentos variáveis
Function argument list
(self=gluon.validators.LazyCrypt object, stored_password=None)
Code listing
2591.
2592.
2593.
2594.
2595.
2596.
2597.
Looks like the problem is that you try pus something in session that is not
pickleable.
On Monday, 17 September 2012 02:59:54 UTC-5, mweissen wrote:
From the /var/log/apache2/error.log:
[Mon Sep 17 09:39:09 2012] [error] ERROR:web2py:Traceback (most recent
call last):
[Mon Sep 17 09:39:09
but there is no cid variable in sqlhtml.py. I am missing something? Can you
send me a patch and I will try it?
On Monday, 17 September 2012 03:39:30 UTC-5, Massimiliano wrote:
Just add an argument cid=None to SQLTABLE.__init__
and change line 2408-9
from
Fixed in trunk. This does not happen on incorrect password. This happens if
password is NULL in database which should not happen.
On Monday, 17 September 2012 06:52:08 UTC-5, rochacbruno wrote:
When user password is incorrect I am getting this
*File /home/www-data/web2py/gluon/validators.py
Did you try the windows binary or the source?
On Sunday, 16 September 2012 22:10:26 UTC-5, Andrew W wrote:
Thanks. Well it installs OK, but won't start - just times out.
Found some inconsistencies in the book:
*Deployment Recipes:*
In order to use web2py as a Windows service, you must
Also... did you try this with 1.99.7? I am trying to determine if this is a
new issue, an ond issue or a packaging issue.
On Sunday, 16 September 2012 22:10:26 UTC-5, Andrew W wrote:
Thanks. Well it installs OK, but won't start - just times out.
Found some inconsistencies in the book:
What I have done as a workaround is as follows :
def View():
if request.args(0) in ['edit']:
redirect(URL('controller', 'myEdit', args=request.args,
Using facebook connect and google+ user login with facebook account and
password stays null.
--
Yes, my proposal was to add an arguments cid to sqltable.
I've attached a patch just to explain.
Thank you
On Mon, Sep 17, 2012 at 2:08 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
but there is no cid variable in sqlhtml.py. I am missing something? Can
you send me a patch and I
+1 to what David wrote!
Richard
On Mon, Sep 17, 2012 at 3:31 AM, David Marko dma...@tiscali.cz wrote:
Check following:
a) linux is case sensitife on files - check filenames and their references
in web2py
b) check correct os level permissions on files ... so web2py can see read
them ...
Thanks, Mandar. That looks promising. If I come up with any improvements,
I'll share them here.
Cheers,
Mike
On Mon, Sep 17, 2012 at 9:12 AM, Mandar Vaze mandarv...@gmail.com wrote:
What I have done as a workaround is as follows :
def View():
if request.args(0) in ['edit']:
Interesting. That check should never kick in then, unless you have both
auth and other in auth.settings.login_methods.
On Monday, 17 September 2012 08:20:58 UTC-5, rochacbruno wrote:
Using facebook connect and google+ user login with facebook account and
password stays null.
--
Makes sense. It is now in trunk. Thanks.
Massimo
On Monday, 17 September 2012 08:42:17 UTC-5, Massimiliano wrote:
Yes, my proposal was to add an arguments cid to sqltable.
I've attached a patch just to explain.
Thank you
On Mon, Sep 17, 2012 at 2:08 PM, Massimo Di Pierro
http://code.google.com/p/web2py/issues/detail?id=1007
--
I have facebook, google and standard auth.
--
Now I understand. Can you check if it is fixed now?
On Monday, 17 September 2012 09:51:20 UTC-5, rochacbruno wrote:
I have facebook, google and standard auth.
--
1. What will I need to import to get it to recognize 'copy'? I run the
suggested code and get told that 'copy' does not exist. (I'm running 2.5;
what do I conditionally import?)
2. Are we doing a copy because all the adapters share the same 'types'
object?
On Tuesday, August 7, 2012 3:48:35
I used the nightly build, I'll try the source version next.
--
I did a simple import of 'copy' and that got me by that first problem. But
now I have the following problem:
db.define_table('Person_certification',
Field('Person', db.Person),
...
Field('Pending', 'boolean', default = False),
...
I get the following error on the
Ok that answers my question; I would still have to define all the
validators for auth_user.email (assuming there is more than one).
Also just for claficiation, using the following:
db.auth_user.email.requires.error_message = T()
gives me the following error message:
type
Thank you, David.
It's just due to upper case in names of my subdirectories.
Problem solved!
On Monday, September 17, 2012 11:31:13 AM UTC+4, David Marko wrote:
Check following:
a) linux is case sensitife on files - check filenames and their references
in web2py
b) check correct os level
What if I change in DAL my upload fields to the length=128 then the
migration will truncate the existing image names? or I need to backup and
re-upload them after this?
--
Hi,
Having dug a bit deeper into the options available, it doesn't look like
much of a chore to roll my own Google Maps integration.
Looking at my choices this one: -
http://code.google.com/p/jquery-ui-map/
...looked promising, but i wondered what others were using?
However, I'm now
I've got a request object coming to my Web2py app's controller function.
request.args[0] is another function name e.g., blastoff
request.vars are parameters e.g., Storage object: {'seconds':10, 'confirm'
: 'okay'}
how can I call blastoff with the parameters such that I can write blastoff
as...
The better way is
def *_*blastoff(seconds, confirm):
# do whatever
def blastoff():
try:
x = *_*blastoff(**request.vars)
except Exception:
x = error calling function, vars not passed or vars is wrong
return dict(x=x)
On Mon, Sep 17, 2012 at 2:33 PM, Carl
thanks Bruno for the quick reply.
blastoff() was only an example function; note that request.args[0] can
contain other function names.
so, rather than x = *_*blastoff(**request.vars) how can I use the value
in request.args[0] in each call?
ie... I'm writing a dispatch function that will call
Right!
I have a questioning about placeholder attribute. I don't know what the
plans about integration of html5 into web2py (since placeholder is a new
attribute of input in html5), but the only place where it makes sens to set
the placeholder value is at the field definition in the model I
Yes, I have stored a lot of information in session, but only strings and
dicts. The application works fine on my development pc (a windows 7 pc).
The problem arises after I have put the application on the target machine
(ubuntu with apache2).
2012/9/17 Massimo Di Pierro massimo.dipie...@gmail.com
I am using 'mycomp...@gmail.com' as my email address for
auth.settings.mailer.settings.sender
and the sender name shows up as 'mycompany' in the received email. However,
I would like to edit the sender name so it is different from 'mycompany'.
Is there any way to accomplish this using the
Now I got it...
I can see 3 ways.. but that is not so safe to do it...
*option 1*
def dispatcher():
def blastoff(param1, param2):
return something
def foo(param1, param2):
return something
funcname = request.args[0]
params = request.vars
if funcname in
Thanks Bruno - I've got it too! thanks for your help.
On 17 Sep 2012, at 19:05, Bruno Rocha rochacbr...@gmail.com wrote:
Now I got it...
I can see 3 ways.. but that is not so safe to do it...
option 1
def dispatcher():
def blastoff(param1, param2):
return something
Maybe the proper way to append attributes to field is by widget as Anthony
wrote here :
http://stackoverflow.com/questions/8661166/custom-css-classes-for-sqlform-widget-input-in-web2py/8661906#8661906
From this thread :
https://groups.google.com/forum/?fromgroups=#!topic/web2py/c-0EMp26uDc
That's :
for f in db[request.args(0)].fields:
if db[request.args(0)][f].type == 'text':
db[request.args(0)][f].widget = lambda field, value:
SQLFORM.widgets.text.widget(field, value, _placeholder='test123')
Richard
On Mon, Sep 17, 2012 at 2:22 PM,
Ok - I have found the answer myself:
The word none does not mean not active - it means the *role*.
But one proposal remains:
In the page editor there is no checkbox after the word Active: - please
add it!
---
2012/9/17 Martin Weissenboeck mweis...@gmail.com
I have a
Field('Pending' upper case
...
type 'exceptions.KeyError' 'pending' lower case
On Monday, 17 September 2012 11:37:13 UTC-5, MichaelF wrote:
I did a simple import of 'copy' and that got me by that first problem. But
now I have the following problem:
sorry. Try:
db.auth_user.email.requires[0].error_message = T()
On Monday, 17 September 2012 11:40:24 UTC-5, Mark Li wrote:
Ok that answers my question; I would still have to define all the
validators for auth_user.email (assuming there is more than one).
Also just for claficiation,
This may not trigger a migration if it causes data truncation. You may have
to do it manually (create a dumy field, move data in there with a script,
and then move it back).
On Monday, 17 September 2012 11:54:04 UTC-5, rochacbruno wrote:
What if I change in DAL my upload fields to the
I tend to agree -- we already have label and comment -- why not
placeholder?
Anthony
On Monday, September 17, 2012 1:53:39 PM UTC-4, Richard wrote:
Right!
I have a questioning about placeholder attribute. I don't know what the
plans about integration of html5 into web2py (since
You error seems to indicate there is a lock object in session. Can you try
check by printing the session.keys() before saving the session?
On Monday, 17 September 2012 12:54:54 UTC-5, mweissen wrote:
Yes, I have stored a lot of information in session, but only strings and
dicts. The
input type= value= placeholder= required=required /
required is another usefull html5 validator, but we already have required
in models but it is not reflected in widgets, maybe for compatibility it
needs a html_required=True
--
Maybe make a dictionary of functions, then map request.args(0) to the
dictionary keys to identify the right function to call (that way if someone
tampers with the URL, they can't call any function that's not in the
dictionary).
Anthony
On Monday, September 17, 2012 1:33:26 PM UTC-4, Carl
Looks like there is not but there should be. Can you please open a ticket
about this?
On Monday, 17 September 2012 12:57:10 UTC-5, Mark Li wrote:
I am using 'myco...@gmail.com javascript:' as my email address for
auth.settings.mailer.settings.sender
and the sender name shows up as
Great idea. But if I use Bruno option #3 and avoid adding other functions
to the module I won't have to repeat myself.
On Monday, 17 September 2012, Anthony wrote:
Maybe make a dictionary of functions, then map request.args(0) to the
dictionary keys to identify the right function to call
I am not planning to support plugin_wiki any more. Except for comments and
ratings everything else is in auth.wiki() and works better. I plan to
revamp coe2py or cms2py to use auth.wiki()
On Monday, 17 September 2012 13:39:21 UTC-5, mweissen wrote:
Ok - I have found the answer myself:
The
Hi, thanks for your post. I tried your suggestion, but still can't get it
to work, here is my new code:
*
{{extend 'layout.html'}}
script
$(function(){
$('.myactions li').click(function(){
elem = $(this);
url = elem.attr('data-url');
I had a web2py 1.99.7 app running on Elastic Beanstalk. I was able to use
the admin interface over https. I then upgraded web2py to 2.0.8 and
uploaded it to EB. Now I am getting this message when I try to access the
admin interface over HTTPS:
ATTENTION: Login requires a secure (HTTPS)
you need to use # on id selectors $(#selector_id)
function parse_my_data(data){
$('*#*target').append(data);
$('*#*target').append(P('hello', XML('bworld/b')));
}
--
Thanks. However, I refer to that field with upper case in all places. Can
you tell me where the lower case 'pending' comes from? The field name has
always been defined as upper case, and the app has been working up until I
made that latest change. So I went into the db and changed the field
That works. THANKS!
On Mon, Sep 17, 2012 at 8:16 PM, Bruno Rocha rochacbr...@gmail.com wrote:
you need to use # on id selectors $(#selector_id)
function parse_my_data(data){
$('*#*target').append(data);
$('*#*target').append(P('hello', XML('bworld/b')));
}
--
--
You probably had erase you parameters.py file when you install the new
version... Did you made a backup?
If so, just copy/paste the 443 parameters py files from the archive into
the web2py folder of the new 2.0.8 installation.
If you didn't make a backup, what you can do is in order to create a
assuming your webserver user is www-data and desired password 123456
cd path/to/web2py
sudo -u www-data python -c from gluon.main import save_password;
save_password('123456',443)
--
Basically, I get the place data with longitude and latitude, calculate it
if it's more than 3000 miles, remove that row from Rows.
I am sure that this is wrong. If I can remove the row from fetch rows, how
can I add extra columns to the rows for distance between two points?
P.S the result has
In my experience working with this I fired out that it is better to use
haversine directly on database, you can find haversine functions for
MySQL, Postgres and even for SQlite.
I dont know how one can write haversine with DAL api, but you can do it
with executesql() as you are going to turn this
Thank you. I tried executesql, I got an error saying it cannot be
serialized in JSON.
On Sep 17, 2012 2:58 PM, Bruno Rocha rochacbr...@gmail.com wrote:
In my experience working with this I fired out that it is better to use
haversine directly on database, you can find haversine functions for
that's fair. i don't know how to get the DAL to handle that based on how
filters are applied when a select is executed
On Saturday, September 15, 2012 3:45:30 PM UTC-7, Alan Etkin wrote:
i'm undecided anyway if this should be automatic for users or if they
should be forced to realize
I want to speed up to pull the referenced table by IS_IN_DB.
For example, EDXUSF00 is referencing TDMUSJ00 table which takes 10 seconds
to display the form because it has about 40,000 records. I was wondring if
I can cache TDMUSJ00 so that it will be faster when the form is displayed
second
IS_IN_DB receives a cache parameter so you can do
db.table.field.requires = IS_IN_DB(, cache=(cache.ram, 1800))
For that number of records I would use an ajax widget with endless scroll.
(http://ivaynberg.github.com/select2/#infinite)
--
Ok - let's try auth.wiki
Is there any manual or description?
2012/9/17 Massimo Di Pierro massimo.dipie...@gmail.com
I am not planning to support plugin_wiki any more. Except for comments and
ratings everything else is in auth.wiki() and works better. I plan to
revamp coe2py or cms2py to use
Yeah ! It's about 5 seconds now !!
On Monday, September 17, 2012 3:22:23 PM UTC-5, rochacbruno wrote:
IS_IN_DB receives a cache parameter so you can do
db.table.field.requires = IS_IN_DB(, cache=(cache.ram, 1800))
For that number of records I would use an ajax widget with endless
Phil,
That plugin still works.
Look in the model file that comes with the plugin. It tells you how to
implement the plugin.
Here is a copy of my model, controller and view files where I got it to
work.
You need to obtain a key from google because if more than a default number
of people visit
Yep here it is: http://code.google.com/p/web2py/issues/detail?id=1017
On Monday, September 17, 2012 12:05:40 PM UTC-7, Massimo Di Pierro wrote:
Looks like there is not but there should be. Can you please open a ticket
about this?
On Monday, 17 September 2012 12:57:10 UTC-5, Mark Li wrote:
Awesome, that worked and I didn't have to redefine the other validators for
auth_user.email
On Monday, September 17, 2012 11:52:38 AM UTC-7, Massimo Di Pierro wrote:
sorry. Try:
db.auth_user.email.requires[0].error_message = T()
On Monday, 17 September 2012 11:40:24 UTC-5, Mark Li
I am trying to port my Baduk client to an web2py app..
I have tried some writing some small programs and have no problem so far..
except.. I do not know how I should update one players board when the other
make a move. I want the server to be able to sen an update to a frame or
force a reload.
Do you have a traceback with more information?
On Monday, 17 September 2012 14:23:56 UTC-5, MichaelF wrote:
Thanks. However, I refer to that field with upper case in all places. Can
you tell me where the lower case 'pending' comes from? The field name has
always been defined as upper case,
we just made it more secure. Has others have suggested you have to re-make
the parameters_*.py file.
On Monday, 17 September 2012 14:15:40 UTC-5, David Phillips wrote:
I had a web2py 1.99.7 app running on Elastic Beanstalk. I was able to use
the admin interface over https. I then upgraded
This is nicer way of restoring it :)
Thanks Bruno!
Richard
On Mon, Sep 17, 2012 at 3:50 PM, Bruno Rocha rochacbr...@gmail.com wrote:
assuming your webserver user is www-data and desired password 123456
cd path/to/web2py
sudo -u www-data python -c from gluon.main import save_password;
def index(): return auth.wiki(manage_permissions=True or False)
It should be straightforward. If it is not something is wrong. Feel free to
ask questions here.
I will write some documents asap. Use trunk because I renamed a field to
avoid conflict.
On Monday, 17 September 2012 15:26:02
IS_IN_DB is incharge of building the select(*options). How many options do
you get in the form. It is possible most of the time is spent in rendering
the form. Perhaps you should use
requires = [IS_IN_DB()] # notice the [...] and the autocomplete widget.
On Monday, 17 September 2012
Your're correct.
I never use autocomplete widget before but I will try it!
On Monday, September 17, 2012 4:21:20 PM UTC-5, Massimo Di Pierro wrote:
IS_IN_DB is incharge of building the select(*options). How many options do
you get in the form. It is possible most of the time is spent in
Yes; here it is:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File gluon/restricted.py, line 205, in restricted
File C:/Program Files (x86)/web2py/applications/NCAA_schedule/models/db.py
http://127.0.0.1:8000/admin/default/edit/NCAA_schedule/models/db.py, line
165, in
Dear All.
Every day i did received a email (gmail) with a file attached (text) as rar.
My question is how i can read this file attached from web2py?
Or how i can download this file to /tmp folder?
Any idea.
Regards
--
Hi,
I have an idea of adding youtube video to the ballo t(edit) , So, I added
{{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}}
but, it didn't work.
is it possible ? and How ?
Regards,
Ashraf
--
Hi!
I'm testing the lazy options plugin again, the website is here:
http://dev.s-cubism.com/plugin_lazy_options_widget
And I find that if 'form has errors', the selected value gets reset instead
of being remembered (all the other fields get remembered).
The code for form has errors is the
Sorry, when I replied I only saw Bruno's first reply. I like his option #3
as well.
Anthony
On Monday, September 17, 2012 3:06:51 PM UTC-4, Carl wrote:
Great idea. But if I use Bruno option #3 and avoid adding other
functions to the module I won't have to repeat myself.
On Monday, 17
Hey guys,
I'm passing in an array via $.ajax:
$.ajax({
data: { table: [[1, 2], [3, 4]] }
type: post
...
})
And request.vars (a Storage object) gets converted by jQuery into something
like this:
Storage {'table[0][]': ['1', '2'], 'table[1][]': ['3', '4']}
And I can't use getlist()
Hello I am running into issues updating records in my MySQL database after
adding multiple=True like so
Field('region', db.region, label='Region *',
requires=IS_IN_DB(db,db.region.id,'%(title)s', multiple=True)),
Any ideas how to fix this I am using web2py 1.99.7
*cheers
and ty ;-)
--
Sorry forgot to post the full Error message
Traceback (most recent call last):
File /var/www/web2py/gluon/restricted.py, line 205, in restricted
exec ccode in environment
File /var/www/web2py/applications/sc_coast/controllers/appadmin.py
You can do something like this:
In [17]: request_vars = {'table[0][]': ['1', '2'], 'table[1][]': ['3',
'4']}
In [18]: table = request_vars.values()
In [19]: table[0]
Out[19]: ['1', '2']
In [20]: table[1]
Out[20]: ['3', '4']
or to be sure about the sequence.
In [25]: request_vars =
I cannot reproduce this error with your code in 2.0.9 and the lines in your
traceback do not correspond to the source code I have. I think you may be
using an older dal.py
On Monday, 17 September 2012 16:43:30 UTC-5, MichaelF wrote:
Yes; here it is:
1.
2.
3.
4.
5.
6.
7.
8.
9.
I will add the option.
On Monday, 17 September 2012 17:35:39 UTC-5, apps in tables wrote:
Hi,
I have an idea of adding youtube video to the ballo t(edit) , So, I added
{{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}}
but, it didn't work.
is it possible ? and How ?
This is probably fixed in trunk. You should upgrade.
On Monday, 17 September 2012 19:50:38 UTC-5, Andrew Evans wrote:
Hello I am running into issues updating records in my MySQL database after
adding multiple=True like so
Field('region', db.region, label='Region *', requires=IS_IN_DB(db,
Will do I saw it was fixed in Trunk
Does Trunk mean the not released version?
*cheers
Andrew
--
Trunk means the most recent devel version from git or hg, it is unstable
but issues are fixed very quickly
git clone https://github.com/web2py/web2py
hg clone https://code.google.com/p/web2py
--
Well, that's unfortunate. I've migrated this semi-manually; I had only four
'boolean' fields.
Other than that, the suggested fix (
db._adapter.types['boolean']='TINYINT(1)' ) seems to work.
On Monday, September 17, 2012 8:42:24 PM UTC-6, Massimo Di Pierro wrote:
I cannot reproduce this error
Thank you for deciding to add the option.
Please, let me understand.
Is adding the plugin_wiki to the voting application, will make
*{{=MARKMIN(embed:http://www.youtube.com/embed/x1w8hKTJ2Co )}}*
or
*{{=plugin_wiki.widget('youtube',code='* *x1w8hKTJ2Co * *')}}*
possible (understandable) in
Thanks, Bruno! I actually don't care about the order of rows so
request.vars.values() worked for me.
Excellent.
On Monday, September 17, 2012 6:32:27 PM UTC-7, rochacbruno wrote:
You can do something like this:
In [17]: request_vars = {'table[0][]': ['1', '2'], 'table[1][]': ['3',
'4']}
94 matches
Mail list logo