Re: [web2py] Re: Logging in web2py

2010-08-17 Thread Jonathan Lundell
On Aug 17, 2010, at 9:16 PM, Yarin wrote: > @Jonathan- Like your use of config files for default configurations, > but beyond that I'm not clear on what your patch is meant to solve- > What's your reason for introducing named loggers and sub-loggers at > the site level? Couldn't the root logger j

[web2py] Re: Logging in web2py

2010-08-17 Thread Yarin
@Jonathan- Like your use of config files for default configurations, but beyond that I'm not clear on what your patch is meant to solve- What's your reason for introducing named loggers and sub-loggers at the site level? Couldn't the root logger just handle all this? My intention was to use named

[web2py] Re: Getting key error on modifying the length of string in DAL

2010-08-17 Thread Narendran
Hi, No This is MySQL. And I didn't change the field type. I am sending the model to you in another mail. On Aug 16, 11:34 pm, mdipierro wrote: > can you post the model? is this sqlite? did you also change the field > type? > > On Aug 16, 11:39 am,Narendran wrote: > > > > > > > > > Hello, > > In o

[web2py] new user specific groups -usuario nuevos en grupos especificos

2010-08-17 Thread Luis Díaz
new user specific groups I want the users who register they are not set up a group automaticamante. so disable the option .. auth.settings.create_user_groups = False now I need that users successfully achieve registration are added to the group type 1 or type 2 .. conditionally speaking I tried

[web2py] Re: Multi Select and Select DB.

2010-08-17 Thread mart
actually i ended up reading an interesting thread on this matter this morning, had good stuff on storing custom types. May actually be a little closer to what you had mentioned (a list vs a dictionary - otherwise close enough). here is where i had my read: http://www.mail-archive.com/web2py@google

[web2py] tree like references for web2py Hl7 application

2010-08-17 Thread dbb
Massimo, I sent you a message yesterday on the same issue, a is table b is table referencing a c is a table referencing b d is a table referencing c I want all child tables to be displayed under their parents, we the parent has data, the children are visible and one can update the data in the ch

[web2py] Re: Multi Select and Select DB.

2010-08-17 Thread apaterno
Yes, In fact I'm doing some like that but I was just wondering if there's some "web2py" way of doing It, On Aug 17, 5:20 pm, mart wrote: > Maybe store a pickled dictionary? so then when you select and load the > object, you can reference its values... > > Just a thought, > > Mart :) > > On Aug 17

[web2py] Re: Model file variable scope

2010-08-17 Thread NetAdmin
I'll try that thanks. Mr.NetAdmin On Aug 17, 5:11 pm, mdipierro wrote: > I am not sure it is a good idea to modify a system library like > gluon.tools.py, anyway > > in class Auth, you should have access to self.environment.request.vars > > On Aug 17, 4:57 pm, NetAdmin wrote: > > > So how can

[web2py] Re: Model file variable scope

2010-08-17 Thread mdipierro
I am not sure it is a good idea to modify a system library like gluon.tools.py, anyway in class Auth, you should have access to self.environment.request.vars On Aug 17, 4:57 pm, NetAdmin wrote: > So how can I grab last_name during a register function and save it > to an already defined table? >

[web2py] Re: Model file variable scope

2010-08-17 Thread NetAdmin
So how can I grab last_name during a register function and save it to an already defined table? Thanks On Aug 17, 4:52 pm, mdipierro wrote: > gluon/tools.py is a module and it is imported before your app is > executed. The web2py globals variables are not exposed there. > > On Aug 17, 4:46 pm, N

[web2py] Re: error when changing field type from float to decimal

2010-08-17 Thread mdipierro
The problem is that web2py relies on the database to perform the data conversion. Which database do you use? Massimo On Aug 17, 4:38 pm, Philip wrote: > I have an application that is up and running (which is relevant > because I don't want to erase all the data already in it), in which I > want

[web2py] Re: Model file variable scope

2010-08-17 Thread mdipierro
gluon/tools.py is a module and it is imported before your app is executed. The web2py globals variables are not exposed there. On Aug 17, 4:46 pm, NetAdmin wrote: > in gluon/tools.py, I'm trying to modify the register() function > to save request.vars.get('last_name', None ) to a table defined in

[web2py] Model file variable scope

2010-08-17 Thread NetAdmin
in gluon/tools.py, I'm trying to modify the register() function to save request.vars.get('last_name', None ) to a table defined in db.py as db.define_table('tbextra', SQLField('lastn', 'string', length = 15 ) ) but tools.py does not recognize the db part of db.tbextra.lastn I thought variables i

[web2py] error when changing field type from float to decimal

2010-08-17 Thread Philip
I have an application that is up and running (which is relevant because I don't want to erase all the data already in it), in which I want to change a field type from float to decimal. As soon as I change my model file and refresh the app, I get the following error: ValueError: invalid literal fo

[web2py] Re: recipy to migrate DB to GAE

2010-08-17 Thread howesc
perhaps i have led you astray...i have not done that sort of download from non-GAE to GAE. references will break for sure, but if you are lucky enough to not have them, maybe the CSV export/import all tables at once (see section 6.25.2 of version 3 of the book) will work for you. when i was first

[web2py] Re: Multi Select and Select DB.

2010-08-17 Thread mart
Maybe store a pickled dictionary? so then when you select and load the object, you can reference its values... Just a thought, Mart :) On Aug 17, 3:55 pm, apaterno wrote: > Hi, I'm new at web2py, and I made a few applications, so, Its time to > go for a little more complicated work, and I'm hav

[web2py] Multi Select and Select DB.

2010-08-17 Thread apaterno
Hi, I'm new at web2py, and I made a few applications, so, Its time to go for a little more complicated work, and I'm having a problem with multiselect fields. I'v 2 tables one table is for IPs and another table is for Hostnames. One IP can have more that one hostname, so, I'm using multiple=true f

[web2py] sms provider

2010-08-17 Thread mattynoce
has anyone used massimo's relatively new sms command in a program? have you found a provider that you like? i'm working on a team where we're looking to add sms technology, where users can text in updates and we can text them back with alerts and status updates and such. but at a couple cents per

[web2py] Re: Logging in web2py

2010-08-17 Thread Iceberg
Nice work, Yarin! You use a more decent way, logging.getLogger(request.application), to achive app-wide logger. It is better than my cache.ram() trick. Oh, I was so blind, man. :-) And I wish GAEHandler and get_configured_logger() could go to web2py trunk, and the scaffold's models/model.py co

[web2py] GAE authorization as admin

2010-08-17 Thread Martin.Mulone
In GAE, I want to know when the user is an admin of the application, to make privilege as admin. I saw the appengine api user, and gluon/ contrib/gae_google_account.py and the class GaeGoogleAccount. I think if I add something like this do the job: def is_user_admin(self): is_admin=False

[web2py] Re: recipy to migrate DB to GAE

2010-08-17 Thread Jurgis Pralgauskis
I was experimenting on bulk download/upload. I have simple table (Languages), which I first fill with a couple of records. Then I download them -- seems nice. The problem I get, is that when Uploaded (actually the same stuff), id values are stored in some strange column "Key Name", but not in "id"

[web2py] external automation & DBs - web2py guide lines & best practices?

2010-08-17 Thread mart
Hi all, I would like to have some external build automation access existing DBs (select/insert) as well as create new DBs/tables in large enough numbers. Some of the data that needs to be stored will be pickled, i.e. xml objects, dicts, and anything else i can pickle & store (I'm somewhat of a pa

Re: [web2py] Re: PAPERBACK web2py book

2010-08-17 Thread Jonathan Lundell
On Aug 17, 2010, at 4:49 AM, mdipierro wrote: > As I explained in a previous thread there seem to be some legal > problems. Lulu is the publisher and they offer amazon or ibookstore. > They do not seem to allow both and I cannot redistribute the book > without them using the same isbn. yet ibookst

Re: [web2py] Re: Seeking advice: web2py app project hosting and licensing

2010-08-17 Thread Albert Abril
For what i know, in you wanna release it in opensource as GPL, in webservices the most appropiate license is AfferoGPL, that assure you that any modifications at code should be distributed again. More info: http://www.affero.org/oagf.html I hope that this helps. Regards! On Tue, Aug 17, 2010

[web2py] Re: Seeking advice: web2py app project hosting and licensing

2010-08-17 Thread Michael Ellis
Chris, thanks very much for the detailed reply! Based on your feedback, it looks like Google Code will be more than adequate for hosting the project. You've also helped me move a little closer to the GPL licensing model. I'll probably carve out a commercial exception for unmodified binary distri

[web2py] Re: PAPERBACK web2py book

2010-08-17 Thread mdipierro
As I explained in a previous thread there seem to be some legal problems. Lulu is the publisher and they offer amazon or ibookstore. They do not seem to allow both and I cannot redistribute the book without them using the same isbn. yet ibookstore requires an isbn. Let me keep looking if you ha

Re: [web2py] Re: PAPERBACK web2py book

2010-08-17 Thread David Mitchell
Hi Massimo, Any chance of an EPUB format? I've promised myself I won't buy any more technical books in dead-tree format, and PDFs are just too hard to read on my ebook reader. Regards David Mitchell > > > > > On Aug 13, 5:36 pm, mdipierro wrote: > > > > > > The 3rd edition of the book is fin

[web2py] Re: 1.82.1 MemcacheClient problem

2010-08-17 Thread Ozz
Sorry for the late answer. For version 1.82.1 traceback: c:\web2py>python web2py.py -S XXX -N WARNING:root:no file locking web2py Enterprise Web Framework Created by Massimo Di Pierro, Copyright 2007-2010 Version 1.82.1 (2010-08-05 01:00:12) Database drivers available: SQLite3, MySQL WARNING:root:

[web2py] Re: Tagging Plugin Help

2010-08-17 Thread mdipierro
isn't the controller called plugin_tagging? in this case LOAD('plugin_tagging','tagging',args=(table_name,record_id or 0),ajax=True) On Aug 17, 4:59 am, "david.waldrop" wrote: > CANCEL THAT. > > The function defined in the model (see code below) is being executed > as I see the print statements

[web2py] Re: Tagging Plugin Help

2010-08-17 Thread david.waldrop
CANCEL THAT. The function defined in the model (see code below) is being executed as I see the print statements on the console. def tags(table_name=None,record_id=0): """ You can tag a record of a table by embedding this:: {{=tagging('mytable',45)}} where 'mytable' is a table n

[web2py] Re: Tagging Plugin Help

2010-08-17 Thread david.waldrop
massimo thanks for the response. It is good to see someone else either has insomnia or likes to get up way to early. I swapped out the code from the tagging plugin with the code form the wiki, but still have the same problem. In essence I cannot use the plugin as is because of the separate commu

[web2py] Re: Custom login redirection issue

2010-08-17 Thread Adi
Awesome! It works nicely now. Thanks! On Aug 17, 1:37 pm, mdipierro wrote: > I think you want to set in db.py > > auth.settings.controller = 'c' > > On Aug 17, 1:00 am, Adi wrote: > > > > > Hi, > > > I'm on web2py 1.82 and I'm facing this issue: > > > I have a custom controller c in which I have

[web2py] Re: TypeError: 'NoneType' object is not callable

2010-08-17 Thread mdipierro
this was a bug and was fixed in 1.83.2. please check it. Massimo On Aug 17, 3:24 am, Karan Poddar wrote: > import datetime; now=datetime.datetime.today() > > db.define_table('Genre', >                 SQLField('Name','string')) > > db.Genre.Name.requires=IS_NOT_IN_DB(db,'Genre.Name') > > db.defi

[web2py] TypeError: 'NoneType' object is not callable

2010-08-17 Thread Karan Poddar
import datetime; now=datetime.datetime.today() db.define_table('Genre', SQLField('Name','string')) db.Genre.Name.requires=IS_NOT_IN_DB(db,'Genre.Name') db.define_table('Songs', SQLField('Name','string',requires=IS_NOT_EMPTY()), SQLField('file','upl

[web2py] Re: Access Control and Basic Authentication ?

2010-08-17 Thread mdipierro
will look into this.. On Aug 17, 2:41 am, Niphlod wrote: > sorry for the late answer... > > in order to let web2py be a real kickass framework also for web > services, I think that some validators have to be rewritten/added. > > Usually I tend not to harrass the devs if what I want isn't there, b

[web2py] Re: Custom login redirection issue

2010-08-17 Thread mdipierro
I think you want to set in db.py auth.settings.controller = 'c' On Aug 17, 1:00 am, Adi wrote: > Hi, > > I'm on web2py 1.82 and I'm facing this issue: > > I have a custom controller c in which I have these functions and > corresponding views: > > c.py > - > @auth.requires_login() > def index

[web2py] Re: Tagging Plugin Help

2010-08-17 Thread mdipierro
Please use plugin_wiki and {{=plugin_wiki.widget('tagging',_}} instead. plugin_tagging as a separate piece will no longer be supported unless somebody adopts it. On Aug 16, 7:32 pm, "david.waldrop" wrote: > I am having a problem with some customization of the tagging plugin. > I downloaded

[web2py] problem in playing a playlist

2010-08-17 Thread tiffany
i am creating a playlist from the files stored in the uploads folder of the song during function call and storing it in the uploads folder only.I have wriiten only the relative paths of the songs (in this case the song file name itself' So when run direclty on the computer it works. but in the view

[web2py] Re: Access Control and Basic Authentication ?

2010-08-17 Thread Niphlod
sorry for the late answer... in order to let web2py be a real kickass framework also for web services, I think that some validators have to be rewritten/added. Usually I tend not to harrass the devs if what I want isn't there, but you look real active, so...I think that web2py needs 1 more settin