Hi Simon,
Thanks for the update! This is interesting. One question, are you making
use of cache.py? I had huge memory problems a while ago and I didn't have
time to debug. A colleague was testing on windows and each time it crapped
out his system where he was forced to do a hard reboot (but
Thanks for the replies. d3js looks very interesting, I will look into that.
On Tue, Jan 8, 2013 at 3:56 AM, Andrew W awillima...@gmail.com wrote:
I haven't either, but I'd recommend a look at d3js.org, if you want to use
svg.
I've done something similar to this one, using a web2py generated
Thanks for this explanations! To add more info, I can say that the elements
on left column are naturally ordered, I have thousands of
records(~5000record/day) for each station but only a few
station_id(~5-10stations totally).
Instead of making a complex query, a cleaner approach would be to run
That's a negative on cache.py.
It's from a nightly build pulled about 5 days ago.
The csv in question is about 150k records.
(have pruned it down to a test of 10 records, and they import OK).
Has about 140 fields, quite a few nulls, and have compensated for the
adapter's postgres decimal
Isaac, if you do a search on this group, you'll find a bit more info.
Failing that, we may need to do the same in the next few days ...
--
I have a database table shown below:
db=DAL(sqlite://storage.sqlite)
db.define_table('content',
Field('author'),
Field('time', 'datetime', update=request.now),
Field('text', 'text'),
Field('picture', readable=False),
Question is, how do I connect to the database via a script, and what is the
El martes, 8 de enero de 2013 01:25:02 UTC-3, howesc escribió:
shouldn't non-list data types not accept list input? this sounds like an
un-expected side effect to me.
I don't know, does web2py restrict input strictly by default in other cases
(raising exceptions, etc)? The behavior should
Hi all, I have a simple problem, how I can extract values of a single point?
I found that there are the functions ST_X, and ST_Y.
Please find attached a patch that add them to dal and to the postgres
adapter, I haven't put them neither to MSSQLAdapter nor to
SQLITESpatiaLiteAdapter because I
For example, on insert/update, DAL tries to adapt values casting
different types for compatibility.
Sorry, the above is wrong. Some adapters in dal.py have that behavior, not
the DAL class
--
Can i do this select db(db.table1.id in [1,2,3]).select() ?
thank you
António
--
Thank you,
That was very helpful...
But I am unable to display the way u specified the SQL form. But I got ur
method of maintaining the database.
On Monday, January 7, 2013 4:38:42 AM UTC+5:30, Alan Etkin wrote:
El domingo, 6 de enero de 2013 13:32:49 UTC-3, Cler escribió:
Hello,
Is
hello
how do i log each time a user logs in?
thank you
António
--
Try:
db(db.table1.id.belongs([1,2,3])).select()
You can always print the SQL to your console so you can check it is what
you expect...
db(db.table1.id.belongs([1,2,3]))._select()
(Note the underline: _select)
On Tuesday, January 8, 2013 11:44:28 AM UTC, Ramos wrote:
Can i do this select
Its nice to see this graph. Pleas add labels in the graph.
Its not documented but i think it is worth it.
Now i can see that my app started 20 days ago and i have about 300 lines of
code.
When i report my app to my boss i can tell him this just for statistics
sake.
Thank you
António
2013/1/5
http://web2py.com/books/default/chapter/29/06#belongs
On Tuesday, January 8, 2013 6:44:28 AM UTC-5, Ramos wrote:
Can i do this select db(db.table1.id in [1,2,3]).select() ?
thank you
António
--
Thank you very much! I knew it had to be simple. I just didn't infer that
information from the way the book explained it. Your help is much
appreciated!
On Monday, January 7, 2013 3:31:33 PM UTC-5, Dave Cenker wrote:
This seems so elementary, but I can't seem to find out how to do it in the
if you dind't change the default settings, you can find already a line for
every log-in action into the auth_event table.
Il giorno martedì 8 gennaio 2013 12:53:16 UTC+1, Ramos ha scritto:
hello
how do i log each time a user logs in?
thank you
António
--
You can do
begin script.py
from gluon import DAL, Field
db=DAL(sqlite://storage.sqlite, path='/path/to/app/databases')
db.define_table('content',
Field('author'),
Field('time', 'datetime', update=request.now),
Field('text', 'text'))
db.content.insert()
/end
$ pyhton script.py
or
begin
In trunk. How about the previous issue? Is that still open? If so, can you
please open a ticket? Thanks.
On Tuesday, 8 January 2013 05:31:28 UTC-6, Paolo valleri wrote:
Hi all, I have a simple problem, how I can extract values of a single
point?
I found that there are the functions ST_X,
great!
thk
2013/1/8 Niphlod niph...@gmail.com
if you dind't change the default settings, you can find already a line for
every log-in action into the auth_event table.
Il giorno martedì 8 gennaio 2013 12:53:16 UTC+1, Ramos ha scritto:
hello
how do i log each time a user logs in?
thank
You can do:
Field('user', db.auth_user, default=auth.user_id, writable=False))
Anyway, type and user are not valid field names. They work with sqlite
but will break with postgresql and other databases.
On Monday, 7 January 2013 14:31:33 UTC-6, Dave Cenker wrote:
This seems so elementary, but
Hi Massimo, good to know that the patch is in trunk but I it is only for
the postgres adapter, I can try to define the same functions for the other
adapter but then someone has to check if they works or not.
For what concern the other issue I will open I ticket, the main problem is
that web2py
I'm also facing this issue, can anyone help !
Thanks
--
How can I prevent the SQLFORM from deleting a record? I have an ondelete
callback that I want to do the deletion, and I don't want the form to
subsequently attempt to delete the same record upon return from the
callback.
Thanks in advance,
Mike Schoonover
--
I've been researching about this since my last post, and just to be clear,
this is exactly what I need to
do: http://railscasts.com/episodes/196-nested-model-form-part-1 (please
watch minute 1:00 of this video).
So I wonder if it is possible to use web2py to create nested forms such as
Hi,
I'm working with my own authentication provider as: *
auth.settings.login_form=MyAuth()*, all *works correctly*.
I need an additional field from default auth_user table definition, I used:
*auth.settings.extra_fields['auth_user'] = [Field('**employee_id**',
'text')]*, works correctly (the
From the
bookhttp://web2py.com/books/default/chapter/29/06#before-and-after-callbacks
:
The return values of these callback should be None or False. If any of the
_before_* callback returns a True value it will abort the actual
insert/update/delete operation.
I'm guessing the 'return true'
hypothesis 2 is off the table
BTW: saying that you have a method that returns a dict and stating that
that method doesn't update a field lacks of the key point..
*Who*writes/updates the auth_user table in your custom class ?
On Tuesday, January 8, 2013 5:36:39 PM UTC+1, Ignacio Ocampo
No way to set an index... perhaps you could use caching.
On Tuesday, January 8, 2013 1:27:46 AM UTC-7, Paolo valleri wrote:
Thanks for this explanations! To add more info, I can say that the
elements on left column are naturally ordered, I have thousands of
records(~5000record/day) for each
I only return a dict in the get_user, web2py does all the work.
web2py call the get_user method, and web2py update the auth_user table with
the dict values.
I don't write/update the auth_user table in my custom class.
On Tuesday, January 8, 2013 11:05:04 AM UTC-6, Niphlod wrote:
hypothesis 2
I see that only the first time that user login, web2py saves the
employee_id.
If I logout and login, and I change the employee_id value (I write this in
external file to see the value), web2py does not update the field.
On Tuesday, January 8, 2013 11:08:34 AM UTC-6, Ignacio Ocampo wrote:
I
Did you look into:
gluon/contrib/login_methods/extended_login_form.py
On Wednesday, August 29, 2012 11:56:37 AM UTC-5, JungHyun Kim wrote:
Hello,
I am trying multiple login methods- Twitter or Facebook.
I want to know the best practice to support multiple login methods
(multiple OAuth).
Please open a ticket so I will look into it asap. I would add the st_x/y to
all GIS adapters.
On Tuesday, January 8, 2013 9:36:57 AM UTC-6, Paolo valleri wrote:
Hi Massimo, good to know that the patch is in trunk but I it is only for
the postgres adapter, I can try to define the same
What do you get? An error? What error?
On Friday, January 4, 2013 3:18:32 AM UTC-6, Liang wrote:
drop('cascade') seems not working.
On Wednesday, 4 February 2009 14:17:14 UTC+8, mdipierro wrote:
give this a try. In trunk
db.table.drop('cascade')
On Feb 3, 11:40 pm, Baron
Done,
http://code.google.com/p/web2py/issues/detail?id=1259thanks=1259ts=1357666735
Thanks
Paolo
2013/1/8 Massimo Di Pierro massimo.dipie...@gmail.com
Please open a ticket so I will look into it asap. I would add the st_x/y
to all GIS adapters.
On Tuesday, January 8, 2013 9:36:57 AM
On Tuesday, January 8, 2013 12:08:34 PM UTC-5, Ignacio Ocampo wrote:
I only return a dict in the get_user, web2py does all the work.
web2py call the get_user method, and web2py update the auth_user table
with the dict values.
Yes, but where are you telling web2py to update the auth_user
hello,
I have a table like this:
db.define_table('host',
Field('host_name', requires=IS_NOT_EMPTY()),
Field('host_ip', requires=IS_NOT_EMPTY())
)
i'm using SQLFORM.grid to display/edit the data in the table. When a user
inputs a host_name field, I would like to automatically populate
Thank you,
That was very helpful...
But I am unable to display the way u specified the SQL form. But I got ur
method of maintaining the database.
You mean it doesn't fit with your app layout? The form imitates those
sheets used in schools for course attendance. Maybe it is too wide for
Yes,
I only uses:
auth.settings.login_form=MyAuth(
param1=value1,
param2=value
)
It's all, I never call and writes/update in the auth_user anywhere.
In gluon/tools.py login function, web2py check if they would use their
login form or from a central source (line 1955)
At line 2068
I'd just add javascript to the view to do it.
Attach to the change event on the name field and do ajax requests from the
server for dns resolution. If successful fill in the host_ip field.
Terça-feira, 8 de Janeiro de 2013 17:46:04 UTC, Saba escreveu:
hello,
I have a table like this:
Well, the real problem is I'm using GAE with Google Cloud SQL, so I have
the migrations problem but here is the fix:
On restricted.py line 72:
def _get_table(self, db, tablename, app):
tablename = tablename + '_' + app
try:
table = db[tablename]
except:
look :
http://web2py.com/books/default/chapter/29/09#Integration-with-OpenID,-Facebook,-etc.
www.janrain.com/
--
You'd probably want to have a javascript that calls a special function on
your controller that returns the results from gethostbyname().
On Tuesday, January 8, 2013 10:46:04 AM UTC-7, Saba wrote:
hello,
I have a table like this:
db.define_table('host',
Field('host_name',
I tried to persuade the web2py emailer to use a full name (like: 'My Name
mym...@mail.com') in the From: header by setting it in the headers argument,
but it didn't work: From continued to be set to the value of sender (the bare
email address).
As I read the code, From is initialized to the
Never mind, this solution just worked the first time, when I need to define
the table, the second time it fails too...
On Tuesday, January 8, 2013 4:21:01 PM UTC-2, Felipe Meirelles wrote:
Well, the real problem is I'm using GAE with Google Cloud SQL, so I have
the migrations problem but
Now its working for all requests, but the solution is a little odd:
First try to get the table, then try to define it for the first time and if
it fails, try to just define the table, with no migrate. Is this OK?
def _get_table(self, db, tablename, app):
tablename = tablename + '_' +
How can i make it so that when a user uploads an image, it automatically
gets resized to a specified dimension?
Thanks!
--
in sqlhtml there is a TSV exporter though...
On Wednesday, March 11, 2009 9:08:27 AM UTC-7, mdipierro wrote:
There is no configuration parameter to do so. You mat create your own
csv serializer. look into the python csv module.
On Mar 11, 10:01 am, Marco Prosperi marcoprosperi...@gmail.com
Hi Christian, thanks for your reply! Your approach sounds interesting and
it seems to be one of the best options with what's possible as for this
moment.
I have this page already implemented and working in php/javascript, but I'm
searching for a new full featured framework exactly to avoid
You could monkey-patch the dal 'rows' object __str__ by making it export as
a TSV.
On Wednesday, March 11, 2009 8:01:42 AM UTC-7, Marco Prosperi wrote:
hello everybody,
how can I change the following function (defined in appadmin.py
controller) so that the downloaded file has tab separated
Perhaps it would be a nice feature to add to the smartgrid - in place ajax
update / addition.
So you'd just add a smartgrid to your form, and you can click 'add' and
right in place you can add a new record to the grid / db.
On Tuesday, January 8, 2013 11:43:31 AM UTC-7, Henrique Pantarotto
Take a look at this - maybe it's similar to what you need...
http://www.web2pyslices.com/slice/show/1432/insert-and-delete-ajax-show-process
On Monday, January 7, 2013 12:02:01 AM UTC-7, Henrique Pantarotto wrote:
Hello everybody!
I'm quite new to Python and web2py, but I consumed all of
Take a look here for a somewhat similar example...
http://www.web2pyslices.com/slice/show/1387/upload-image-and-make-a-thumbnail
You'll need the PIL (python image library) installed.
On Tuesday, January 8, 2013 11:43:36 AM UTC-7, Daniele wrote:
How can i make it so that when a user uploads an
They made it even simpler now... (look at contrib/imageutils.py)
#
# Put this file in yourapp/modules/images.py
#
# Given the model
#
# db.define_table(table_name, Field(picture, upload),
Field(thumbnail, upload))
#
# # to resize the picture on upload
#
# from images import RESIZE
#
#
Perhaps I misunderstand the workflow. The solution cannot be to change an
Auth function to handle a specific custom field.
The proper signature for the function is
get_or_create_user(self, keys, update_fields=['email'])
so if you want to pass employee_id to keys and expect it to update the
Nooo. This would break other apps in the same server.
I would take a patch to pass the parameter around or use the grid exporter
in appadmin.
On Tuesday, 8 January 2013 12:52:38 UTC-6, Derek wrote:
You could monkey-patch the dal 'rows' object __str__ by making it export
as a TSV.
On
Hi Jonathan,
Mine is putting properly company name in front of the address, by using:
mail.settings.sender = 'Company', but knowing that you are a guru here, may
not be at all what you are looking for... If you wanted I could send you a
sample email privately to see if that's what you needed?
On 8 Jan 2013, at 11:40 AM, Adi adnan.smajlo...@gmail.com wrote:
Hi Jonathan,
Mine is putting properly company name in front of the address, by using:
mail.settings.sender = 'Company', but knowing that you are a guru here, may
not be at all what you are looking for... If you wanted I could
or use a computed field ?
On Tuesday, January 8, 2013 7:24:36 PM UTC+1, Derek wrote:
You'd probably want to have a javascript that calls a special function on
your controller that returns the results from gethostbyname().
On Tuesday, January 8, 2013 10:46:04 AM UTC-7, Saba wrote:
hello,
I only change the Auth function to solve this problem and to know how
web2py works.
I see that get_or_create_user have a second parameter with fields that will
be updated.
I think that if the developer uses web2py default Auth function, would be
nice allow update fields through
I am using this recipe:
http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box
I have plans to integrate it with a JavaScript Cropper plugin to get the
dimensions.
--
I open a ticket http://code.google.com/p/web2py/issues/detail?id=1260
On Tuesday, January 8, 2013 1:23:45 PM UTC-6, Massimo Di Pierro wrote:
Perhaps I misunderstand the workflow. The solution cannot be to change an
Auth function to handle a specific custom field.
The proper signature for
I use wand for the task: http://pypi.python.org/pypi/Wand/0.1.10
there are many other bindings on the impressive *magick libraries, but
this one being a ctypes implementation is light and fast enough..
mic
2013/1/8 Bruno Rocha rochacbr...@gmail.com:
I am using this recipe:
thank you all... i'll try your suggestions (need to do study
javascript/ajax..)
--
I'm using solidtable to pull a selection from a database and display that
selection (with the ability to edit the db entry) to the user. I added an
extra column with the code:
extracolumns = [{'label': A('Edit', _href='#'),
'content': lambda row, rc: A('Edit', _href=
It seems to me that you could add a 'next' button on that page, which would
take request.args(0)+1 and formulate your HREF that way.
On Tuesday, January 8, 2013 2:43:46 PM UTC-7, D.P. wrote:
I'm using solidtable to pull a selection from a database and display that
selection (with the ability
I think the right way is digitally signed urls. In the book:
http://web2py.com/books/default/chapter/29/04?search=signature
--
Hello!
Is there an equivalent to PHP variable $_SERVER['REMOTE_ADDR']?
I need to get the IP of the clients that are visiting my page to implement
a counter page.
Thanks
--
request.client or request.env.remote_addr
On Tue, Jan 8, 2013 at 8:55 PM, José Eloy pepe.e...@gmail.com wrote:
Hello!
Is there an equivalent to PHP variable $_SERVER['REMOTE_ADDR']?
I need to get the IP of the clients that are visiting my page to implement a
counter page.
Thanks
--
I put imageutils in my app's modules directory, then I added:
Field(thumbnail, upload, uploadfolder=os.path.join(request.folder,
'uploads', 'profiles', 'thumbs')),
to the appropriate database table, and below that, in the same file (db.py)
I wrote:
from imageutils import THUMB
IMHO beautifulsoup is simpler hence faster to implement than other
solutions, very tolerant on bad markup...
2013/1/8 rh richard_hubb...@lavabit.com:
On Mon, 7 Jan 2013 10:55:39 +0200
Vasile Ermicioi elff...@gmail.com wrote:
lxml, beautifulsoup
Thanks, but too much code for my simple
My set up is nginx, uwsgi, web2py, and I am trying unsucessfully to
configure so that there are multiple uwsgi processes serving web2py.
I used the script to install nginx, uwsgi. I configured 8 processes.
$cat /etc/uwsgi/apps-enabled/web2py.xml
uwsgi
pluginpython/plugin
I also test uwsgi serving a Bottle app. I run from the command line,
uwsgi, the bottle app with 8 processes.
This works as I expect. Requests are served by unbusy processes while
long-running requests are still being run.
So something about the web2py configuration that doesn't tell uwsgi
El martes, 8 de enero de 2013 20:58:10 UTC-3, VP escribió:
I also test uwsgi serving a Bottle app. I run from the command line,
uwsgi, the bottle app with 8 processes.
Is that the file created by the script?. uwsgi can take options in
different ways. Make sure it is actually reading the
Alan,
No. From the command line, I told uwsgi to run with 8 processes (for the
Bottle app). Here's the command:
uwsgi --http 127.0.0.1:8080 -p 8 --plugins python --module=app:application
On Tuesday, January 8, 2013 6:09:07 PM UTC-6, Alan Etkin wrote:
El martes, 8 de enero de 2013 20:58:10
Yeah it is a problem in THUMB function, thumb function looks for files
under /uploads and you are defining another folder.
change the imageutils module replacing /uploads with /uploads/profile
On Tue, Jan 8, 2013 at 9:30 PM, Daniele Pestilli byakugan...@gmail.comwrote:
I put imageutils in my
Those who are running nginx, uwsgi, web2py, can you do a quick check to see
if uwsgi reads your web2py config file properly?
The default config has 4 processes. If you do a top -u www-data, you
should see 5 uwsgi processes (4 + 1 master).
If you see a different number (may be 3?), then there
I have a single server, ubuntu 12.04 running 3 web2py instances + 2 php
wordpress websites
Php runs with fcgi - web2py runs with uwsgi, because of that I have 12
nginx workers running
I am not an expert on this, but this solution is working well for me.
That is what I have in top
*TOP*
top -
Thanks
--
Hmm still not working.
I'm wondering if this is the problem:
uploadfolder=os.path.join(request.folder, 'uploads', 'profiles', 'thumbs')
should it be
uploadfolder=os.path.join(request.folder, 'uploads', 'profiles/thumbs') or
something?
On Wed, Jan 9, 2013 at 12:43 AM, Bruno Rocha
It seems to be uploading the full-sized image properly but for the thumb it
says 'thumbnail': None where thumbnail is the field name in the db.py file.
On Wed, Jan 9, 2013 at 1:06 AM, Daniele Pestilli byakugan...@gmail.comwrote:
Hmm still not working.
I'm wondering if this is the problem:
Thanks Bruno.
Okay, I figured it out. I'm not sure if I used an out-of-date
web2py/uwsgi/ngninx install script, but that script does not mention
another file /usr/share/uwsgi/conf/default.ini
This file sets the number of workers to 2 and it overwrites the web2py
configuration file
and youi delete or comment that file?
--
yeah. I commented off the worker=2 setting in that file. Consequently,
the number of workers was exactly what the web2py configure file says.
On Tuesday, January 8, 2013 7:36:01 PM UTC-6, rochacbruno wrote:
and youi delete or comment that file?
--
Ok, but just read this
# User-made changes in this file will be silently lost, as it is silently
# rewrited with upgrade of uwsgi package.
#
# If you want to change default options of uWSGI daemon, then:
# * copy this file somewhere
# * add/remove/change options in copied file
# * edit
are you running on Google App Engine?
--
request.env.remote_addr
--
87 matches
Mail list logo