On 10 May 2012 22:10, Anthony abasta...@gmail.com wrote:
You can turn off migrations globally for the entire db connection via DAL(...,
migrate_enabled=False).
Anthony
p.s., Even people with a programming background find the DAL useful. :-)
I agree. It is useful, but also limiting: e.g.
On 11 May 2012 01:38, Dave davidramsayreinh...@gmail.com wrote:
Any examples or suggestions on how to load data from a user-uploaded
.sqlite database?
I will have the database structure of the uploaded files ahead of time
(they are being generated by a mobile app), so I need a way to
The problem is not that if I call the controller function if consumes
memory. My problem is that there is something that still reference
something after the execution is finished so the consumed memory never get
released / reused...
2012. május 10., csütörtök 23:27:32 UTC+2 időpontban
OK. Finally I have it :)
It was only the amount of memory it was consumed each time. I tried it with
a smaller but a significant number of records and finally I figured out
that there is a limit and after that memory consumption is ok. I had only
reach that count of browser request :-D
Sorry
I had only to reach that count of browser request :-D
I need to be able to dispatch to a different controller based on a database
lookup. So a user will go to a url (say '/dispatch'), and we'll look up in
the database some information on that user, choose a new controller and
function, and call that controller and function with its view.
I've
You can do:
def dispatch():
controller,function = ... load these from the database ...
redirect(URL(c=controller, f=function, vars=request.vars,
args=request.args))
On Friday, 11 May 2012 10:17:19 UTC+1, Michael Toomim wrote:
I need to be able to dispatch to a different
http://web2py.com/books/default/chapter/29/6#Legacy-databases-and-keyed-tables
On Friday, 11 May 2012 00:38:41 UTC+1, Dave wrote:
Any examples or suggestions on how to load data from a user-uploaded
.sqlite database?
I will have the database structure of the uploaded files ahead of time
Thanks Massimo. Please let me know if you need more help in debugging it
On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote:
Now I understand better where all these problems come from. I shall fix it
tonight.
On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote:
Hi,
I have no error message when I wrongly fill a list with spaces / special
characters.
However the validator works, as I need to respect it to update the record.
db.define_table('parameter',
Field('allowed_users', type='list:string'),
)
db.parameter.allowed_users.requires =
Sorry Massimo,
I didn't found any Bug Reporting Tool on the web2py web site or on the
presentation message of this list.
Where can I report the bug ?
Thanks,
Le jeudi 10 mai 2012 02:08:31 UTC+2, François Delpierre a écrit :
Hi,
When I try to select the fields to be displayed as follow :
Le jeudi 10 mai 2012 02:08:31 UTC+2, François Delpierre a écrit :
Hi,
When I try to select the fields to be displayed as follow :
form = SQLFORM.smartgrid(
db.t_xlsfile,
fields=dict(
t_xlsfile=[
db.t_xlsfile.f_xlsfile,
I don't i can say this problem
but in GAE it accept only .png file and other expect .jpg
i don't get the perfect solution.
On Thursday, 10 May 2012 11:33:17 UTC+5:30, Prakhar Srivastava wrote:
what is the max image size we can upload through the img tag ?
Because my application is working
I can't say this problem solve
but in GAE it accept only .png file and other expect .jpg
i don't get the perfect solution.
On Thursday, 10 May 2012 12:06:08 UTC+5:30, Prakhar Srivastava wrote:
when i upload my application this waring come up
2012-05-09 23:02:24.992
Or to avoid a redirect, you can change the function and controller in a
model file:
db = DAL(...)
if request.function == 'dispatch':
request.controller, request.function = [fetch from db]
response.view = '%s/%s.%s' % (request.controller, request.function,request
.extension)
here http://code.google.com/p/web2py/issues/list
Il giorno venerdì 11 maggio 2012 13:32:21 UTC+2, François Delpierre ha
scritto:
Le jeudi 10 mai 2012 02:08:31 UTC+2, François Delpierre a écrit :
Hi,
When I try to select the fields to be displayed as follow :
form =
I developed my original app to use uuid-crossreferences in stead of the
normal 'id'-field. The reason was that I wanted it to be consistent when I
move the database to another computer.
Now I am rewriting the app to make it more efficient and to make the code
cleaner - applying some new features
This may be useful to automate css creation form logo images:
http://99designs.com/tech-blog/blog/2012/05/11/color-analysis/
Yes, this is a known issue when applying IS_LIST_OF to list: type fields.
Previously, you could not even use the IS_LIST_OF validator with list:
fields -- we added support for that case but did not work out the
displaying of errors on the form (which is a bit tricky given how the list:
widget
Bruce,
Are you building dict with query for represent or other use?
Recently I solve speed problem I had by caching dict building query.
I never thought that building a dictionary could be that expensive in term
of cpu load.
Richard
On Thu, May 10, 2012 at 5:13 PM, Bruce Wade
Maybe in some places of the code but not everywhere. The problem is when
there is a large load all 3 servers get very slow on every page. I think it
is the DB layer as we have 90 tables in one database 45 in another. I am
also using connection pooling which I think is causing problems. Because
the
Hi All,
i'm tring to learn web2py, thanks for the wonderful book and for the really
nice tutorial!
i'm a bit 'stuck' on how to perform a simple task (i guess it is simple)
because of my ignorance.
.. i'm bring to update dynamic a graph-chart (generated with matplotlib) using
a form to pass
db.define_table('entity', Field('name'), format='%(name)s')
auth_user_table = db.define_table(
auth.settings.table_user_name,
...
Field('entity', 'list:reference db.entity',
requires=IS_IN_DB(db, 'entity.id','%(name)s', multiple=True),
...
)
Later, I want to get a list
If you need to fetch all entities knowing the user in advance there is a
ultra-simple way to fetch entities in a single query
Actually I don't think anyone will come up with a solution involving more
than 1 additional query to the one required for selecting the user.
user =
the latest DAL produces this error
users = mongo(mongo.user.age==18).select()
File /opt/web2py/gluon/dal.py, line 8004, in select
return adapter.select(self.query,fields,attributes)
File /opt/web2py/gluon/dal.py, line 4528, in select
colnames = [fix(column) for column in
Pretty cool!
Richard
On Fri, May 11, 2012 at 12:05 PM, Bruno Rocha rochacbr...@gmail.com wrote:
Useful application: http://corntab.com/pages/crontab-gui
--
Bruno Rocha
[http://rochacbruno.com.br]
Are you trying to auto-complete a reference field, and you want to be able
to add new records to the referenced table? The built-in autocomplete
widget doesn't handle that out of the box, but upon submission, you could
check the request variables, and if the submitted value doesn't belong to
I am brand new to web2py and relatively new to python and I'm stuck, mainly
on a python issue.
My goal is to have a self-submitting form that allows a user to re-submit
the same simple form any number of times, capture the inputs each time and
display a list of the values entered, with the
Here is my complete model code for a sqlite logging handler. This works the
first time the program is run, and after that I get an error:
class 'sqlite3.ProgrammingError' Cannot operate on a closed database.
*model mylogging.py:*
import logging
import logging.handlers
class
got it working by using the wizard to create a new version of my app.
On Thursday, May 10, 2012 4:16:00 PM UTC-4, Larry Wapnitsky wrote:
the whole plugin_wiki thing is really starting to get my goat. Now I'm
getting errors trying to delete my test wiki page:
class
nix that. the updated version in plugin_wiki is still giving me grief.
the standard version you can install from the wizard (jqgrid) works except
for individual column sizing.
On Friday, May 11, 2012 3:42:04 PM UTC-4, Larry Wapnitsky wrote:
got it working by using the wizard to create a new
One more try please.
On Friday, 11 May 2012 06:04:52 UTC-5, Francisco Costa wrote:
Thanks Massimo. Please let me know if you need more help in debugging it
On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote:
Now I understand better where all these problems come from. I shall
This is just JS. We can integrate it in admin. We use crontab syntax.
On Friday, 11 May 2012 11:28:56 UTC-5, Richard wrote:
Pretty cool!
Richard
On Fri, May 11, 2012 at 12:05 PM, Bruno Rocha rochacbr...@gmail.comwrote:
Useful application: http://corntab.com/pages/crontab-gui
--
Bruno
Is this one or two files?
If the model is passing db to the logger then the db is closed when the
first request responds.
The logger must make its own connection to the db and commit
On Friday, 11 May 2012 14:28:22 UTC-5, Yarin wrote:
Here is my complete model code for a sqlite logging
Screenshot of the issue
herehttp://www.zimagez.com/zimage/screenshot-05112012-041826pm.php
:
http://www.zimagez.com/full/85e6a64dc62ed33f329a618ec91320d41abfadb28052b4b86924c0fb25bf0a9d45207eef74a4ebe8b70e615d5809904e0acef0c8ca77eb20.php
On Friday, May 11, 2012 4:08:01 PM UTC-4, Larry
I'm trying to use the recipe on p. 142 of the web2py cookbook (Uploading
files using a LOADed component) and I'm wondering if there's an error in
the replacement web2py_trap_form function. Line 4 of the replacement
provides an 'if' condition with no statements following (no { } at all). Is
Massimo- see revised - this is one model file and now I'm defining the db
in the constructor, but I get the Cannot operate on a closed database
error immediately.
import logging
import logging.handlers
class AppHandler(logging.Handler): # Inherit from logging.Handler
def __init__(self):
2012/5/11 Bruce Wade bruce.w...@gmail.com:
Maybe in some places of the code but not everywhere. The problem is when
there is a large load all 3 servers get very slow on every page. I think it
is the DB layer as we have 90 tables in one database 45 in another. I am
also using connection pooling
Connections = (pool_size) * (number of web2py processes)
So if you have 10 threads and pool_size = 4
1 * 4 = 4 connections
If you have 10 processes (each with 6 threads):
10 * 4 = 40 connections
As you can see the number of processes is not a term of the computation.
You must count the
This is supposed to be
``
name: jqgrid
table: ips
col_width: 80
width: 700
height: 300
``:widget
On Thursday, 10 May 2012 15:11:32 UTC-5, Larry Wapnitsky wrote:
Even this fails on a wiki page:
``
name: jqgrid
table: db.ips
col_width: 80
width: 700
height: 300
``:widget
Traceback
What do you get if you call this yourself?
Anyway, I do not see the signature. Are you logged in?
jqgrid in plugin_wiki requires login if I remember it right.
On Thursday, 10 May 2012 15:02:27 UTC-5, Larry Wapnitsky wrote:
Also just found this via the dev tools::
Request URL:
I'll try that, but even adjusting, this (in the controller) does not work:
wl2 = plugin_wiki.widget('jqgrid', db.ips, fieldname=b_or_w,
fieldvalue=w, fields=[id, ipaddress, attacknotes])
nor does:
wl2 = plugin_wiki.widget('jqgrid', ips, fieldname=b_or_w, fieldvalue=w,
fields=[id, ipaddress,
After
self.log_db.log.insert(**args)
you need
self.log_db.commit()
every http request, the models, are executed, DAL(...) connects you to the
db (or recycles a connection from the pool), then when the action is done,
it automatically commits or rollsback, then web2py closes the connection.
How can I create a table/grid with a checkbox in front of each row so that
multiple records can be selected for update/delete? Something like your
standard webmail inbox - check off a series of messages and then you can do
something with them. I've got a version working with SQLFORM.factory
Hi All,
I need to sore a lot of file... up to few millions.
Just wondering if that can be done with web2py out of the box without the
need of adding extra code for storing them in a sub folders tree
structure I've read that web2py can organize the files uploaded in
folders. I've created a
A working example on plugin BadMin https://github.com/rochacbruno/badmin
On Fri, May 11, 2012 at 7:13 PM, Brian M bmere...@gmail.com wrote:
How can I create a table/grid with a checkbox in front of each row so that
multiple records can be selected for update/delete? Something like your
So the user is going to be uploading a .sqlite file which you want to
connect to with the DAL and import?
You should be able to create a new DAL connection within a controller
function or probably better yet a module instead of in a model file (which
would have been run too early in the
if form.accepts(request,session):
session.no_filters = session.no_filters+1
try:
session.filter_list.update(request.vars)
except NameError:
session.filter_list = request.vars
except AttributeError:
session.filter_list =
I'm creating a form with drop down boxes like this:
SELECT(*options, _name='q%d' % (q_num), requires=IS_IN_SET(['1', '2', '3',
'4', '5'], error_message=Oops, looks like you missed this one.)
When options looks like this:
options = ['0', '1', '2', '3', '4', '5']
everything is fine. In
You need
name = 'q%d' % (q_num)
SELECT(,value=request.vars.name or '0',...)
Only SQLFORM remembers the state. primitive tags like SELECT, INPUT,
TEXTAREA that do not know state. you must pass state.
On Friday, 11 May 2012 15:52:21 UTC-5, Neil wrote:
I'm creating a form with drop down
The second argument is the name of the table, not the table.
wl2 = plugin_wiki.widget('jqgrid', 'ips', fieldname=b_or_w,
fieldvalue=w, fields=[id, ipaddress, attacknotes])
On Friday, 11 May 2012 17:07:02 UTC-5, Larry Wapnitsky wrote:
I'll try that, but even adjusting, this (in the controller)
yes.
Field('name','upload',uploadseparate=True)
Mind that you have to use this from the beginning when there is nothing in
uploads, else you will not be able to download previously uploaded files.
On Friday, 11 May 2012 17:19:07 UTC-5, sebastian wrote:
Hi All,
I need to sore a lot of
On Friday, May 11, 2012 7:25:21 PM UTC-4, Massimo Di Pierro wrote:
yes.
Field('name','upload',uploadseparate=True)
He's aware of that but seems to think that one level of sub-folders won't
be enough (he's expecting millions of files, so still more than 1000 files
per sub-folder, even with
better, but still no data showing up.
On Fri, May 11, 2012 at 7:23 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
The second argument is the name of the table, not the table.
wl2 = plugin_wiki.widget('jqgrid', 'ips', fieldname=b_or_w,
fieldvalue=w, fields=[id, ipaddress,
Thanks Bruno!
So it looks like building the form myself in HTML is probably the way to go
then. Would be nice to be able to have web2py do the form validation, but
I'll survive. I'm thinking that I might be able to mix and match - use
form.custom to start the form and show some widgets for
Oops. Sorry. I read it in a hurry.
I would not use the file system for something like this. Anyway, upload
separate creates up to 1296 subfolder per table.field. This number can be
increased.
On Friday, 11 May 2012 18:33:22 UTC-5, Anthony wrote:
On Friday, May 11, 2012 7:25:21 PM UTC-4,
WhooHoo! Keeping the same SQLFORM in the controller and then just using
form.custom (see
http://web2py.com/books/default/chapter/29/7?search=form.custom) for my
non-checkbox elements and then simply building the desired grid with check
boxes myself in the HTML works beautifully. Just have to
I have a question I have not been able to answer for myself.
In the web2py cookbook, there is this suggested model for handling tags:
db.define_table('data', Field('value'))
db.define_table('tag', Field('record_id', db.data), Field('name'))
I like that. But I have struggled with the correct
That is done here:
https://github.com/mdipierro/w2cms
Look into the action tags()
On Friday, 11 May 2012 21:06:43 UTC-5, Rod Watkins wrote:
I have a question I have not been able to answer for myself.
In the web2py cookbook, there is this suggested model for handling tags:
Hi All,
I have two static custom errors pages for all 4XX and 5XX error codes.
I want to integrate them with my web2py application which needs to be
deployed on app engine.
I tried playing around with routes.py as well as routers.py but still
couldn't fix the same.
Can anyone please tell me
There's no such thing as routers.py -- if using the parameter-based rewrite
system, you still use routes.py. Anyway, did you try adding routes_onerror
to routes.py: http://web2py.com/books/default/chapter/29/4#Routes-on-error?
Note, you have to restart the app for routes changes to take effect.
Yes I did configure the routes_onerror in routes.py
But whenever I entered the URL of the page which does not exist, it would
still return me *invalid request.*
On Saturday, May 12, 2012 8:40:35 AM UTC+5:30, Anthony wrote:
There's no such thing as routers.py -- if using the parameter-based
This is working great! It's exactly what I needed, and makes my code much
simpler.
Thank you very much! I love it!
On Friday, May 11, 2012 5:03:51 AM UTC-7, Anthony wrote:
Or to avoid a redirect, you can change the function and controller in a
model file:
db = DAL(...)
if
Having the following
def by_country():
count = db.procesados.idpublicacion.count()
rows = db().select(db.procesados.pais, count,
groupby=db.procesados.pais)
return rows.json()
It generates the JSON:
[{pais: , COUNT(procesados.idpublicacion): 236}, {pais: AE,
No, but you can do
for row in rows: row['count'] = row[count]
On Friday, 11 May 2012 23:44:57 UTC-5, Franklin Freitas wrote:
Having the following
def by_country():
count = db.procesados.idpublicacion.count()
rows = db().select(db.procesados.pais, count,
Wow, very cool. One question. In the cms app, a page (with an id) already
exists so the ajax post to the addtag action can add the tag to the page.
In my case the create version of the form will not have an entity with an
id yet since it does not exist in the db. Am I wrong to think than that
If I use what you recommend then what would be the best way to generate the
JSON output
Thanks Massimo
On Saturday, May 12, 2012 12:29:09 AM UTC-4:30, Massimo Di Pierro wrote:
No, but you can do
for row in rows: row['count'] = row[count]
On Friday, 11 May 2012 23:44:57 UTC-5,
67 matches
Mail list logo