[web2py] Re: How could I send a email to every members?

2010-11-23 Thread annet
Hi David, I have a crm app from which I send html mails using the following function: def mail(): m_list=db(...).select(...) for item in m_list: context=dict(item=item) message=response.render('mail/mail.html',context) recipient=item.email boolean=mail.send(to=[r

[web2py] Get User [auth_user] Janrain

2010-11-23 Thread Andrew Evans
Hello I just set up Janrain using the following from gluon.contrib.login_methods.rpx_account import RPXAccount auth.settings.actions_disabled=['register','change_password','request_reset_password'] auth.settings.login_form = RPXAccount(request, api_key='', domain='..', url = "h

[web2py] Re: google maps

2010-11-23 Thread AO
I'm still not sure what the bug was. If I looked under the page source, the latitude, and longitude were both listed. I ended up looking up how to use google maps a different way to generate my map and custom tags. I know I had an issue with the submenu getting cutoff by my YouTube video in the

Re: [web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Jonathan Lundell
On Nov 23, 2010, at 8:48 PM, Anthony wrote: > > On Nov 23, 9:26 pm, Jonathan Lundell wrote: >>> On Nov 23, 8:10 pm, Timbo wrote: Set numthreads=0 in your options.py. See if you still see this behavior. >> >>> options.py is just for running web2py as a Windows service, no? I'm >>> not

[web2py] Re: web2py.gluon.html.XML allowing relative urls

2010-11-23 Thread Jlew
Here is a fixed one putting the allowed schemes again. diff --git a/gluon/sanitizer.py b/gluon/sanitizer.py --- a/gluon/sanitizer.py +++ b/gluon/sanitizer.py @@ -151,11 +151,12 @@ def url_is_acceptable(self, url): """ -Requires all URLs to be \"absolute.\" +Accepts re

[web2py] Re: web2py.gluon.html.XML allowing relative urls

2010-11-23 Thread mdipierro
Thank you Jlew. I am in favor of this. Can anybody see any reason for not accepting relative URLs? Massimo On Nov 23, 10:57 pm, Jlew wrote: > I noticed that the XML module does not allow relative URL's when > sanitize is set to true.  I would think that local urls would be > helpful to allow as

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Timbo
That's essentially the effect I was going for. No need to change DEFAULT_MIN_THREADS, changing DEFAULT_MAX_THREADS should have the desired effect. On Nov 23, 10:59 pm, Anthony wrote: > I went into rocket.py and set both DEFAULT_MIN_THREADS and > DEFAULT_MAX_THREADS to 0, and the problem I descri

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Anthony
I went into rocket.py and set both DEFAULT_MIN_THREADS and DEFAULT_MAX_THREADS to 0, and the problem I described (i.e., long load times when trying to load apps into separate IE browser tabs) seems to go away (apps now load instantly in new IE tabs). Anthony On Nov 23, 11:48 pm, Anthony wrote: >

[web2py] web2py.gluon.html.XML allowing relative urls

2010-11-23 Thread Jlew
I noticed that the XML module does not allow relative URL's when sanitize is set to true. I would think that local urls would be helpful to allow as the web2py URL function produces relative urls. It would only make sense to allow relative links. I found a case where html links generated from url

[web2py] Getting AttributeError:EXISTS instance has no __call__ method when deploying to AppEngine from Admin Console

2010-11-23 Thread Narendran
Hello Web2Py, I'm now just trying out Web2py 1.85.1, and learning to deploy my apps on Google AppEngine. I'm able to deploy my web2py app successfully by running appcfg.py from command prompt, but if I try to do the same from admin console using "Deploy on Google App Engine" feature, I keep getting

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Anthony
On Nov 23, 9:26 pm, Jonathan Lundell wrote: > > On Nov 23, 8:10 pm, Timbo wrote: > >> Set numthreads=0 in your options.py.  See if you still see this > >> behavior. > > > options.py is just for running web2py as a Windows service, no? I'm > > not running web2py as a Windows service when I observe

[web2py] Re: CRUD json/xml/etc not using format

2010-11-23 Thread mdipierro
Yes. On Nov 23, 10:29 pm, Kurt Grutzmacher wrote: > I'm wondering if this is expected behavior or not with CRUD. Given two > tables: > > db.define_table('hash_types', >     Field('htype', 'string', requires=IS_NOT_EMPTY()), >     format='%(htype)s', > ) > > db.define_table('hashes', >     Field('

[web2py] CRUD json/xml/etc not using format

2010-11-23 Thread Kurt Grutzmacher
I'm wondering if this is expected behavior or not with CRUD. Given two tables: db.define_table('hash_types', Field('htype', 'string', requires=IS_NOT_EMPTY()), format='%(htype)s', ) db.define_table('hashes', Field('enchash', required=True, unique=True, label="Encrypted hash"), Fie

[web2py] Re: Creating vars in a URL

2010-11-23 Thread mdipierro
uploading to trunk. thanks On Nov 23, 8:54 pm, DenesL wrote: > Massimo, I have emailed you a patch for this and another smaller > problem. > > On Nov 22, 8:23 pm, DenesL wrote: > > > To get a url you should use URL as explained > > inhttp://web2py.com/book/default/chapter/04#URL > > > and it sh

Re: [web2py] is_in_db error message translation

2010-11-23 Thread Vinicius Assef
Are you getting some error message? On Tue, Nov 23, 2010 at 7:43 PM, Richard Vézina wrote: > Hello, > I try this : > db.table1.field1.requires=\ > >  IS_IN_DB(db,'othertable.field1',orderby=('field1'),error_message=T('value > not available')) > But not working... > How may I translate the IS_IN_

[web2py] Re: Upgrade web2py on webfaction

2010-11-23 Thread GoldenTiger
On 19 nov, 15:18, Bruno Rocha wrote: > I did the upgrade by admin 2 times and that broke my system. > > Bruno Rochahttp://about.me/rochacbruno/bio do you remember versions that broke it?

Re: [web2py] Re: Development Partnership

2010-11-23 Thread Steve Shepherd
Vihang I need to see some examples of work? Are you interested in % share type of development? I will need an NDA signed before showing you all the details. Steve On 24 November 2010 16:13, vihang wrote: > Steve, > > Can you email me the project details. I have a team of web2py > developers

[web2py] Re: your assignment freelancer.org

2010-11-23 Thread Richard
Is this appropriate for the web2py mailing list? Many students cheat on assignments. On Nov 19, 6:50 pm, mdipierro wrote: > This looks like somebody's homework assignment > > http://www.i-freelancer.org/php/python-expert-for-a-small-assignment-... > > Massimo

[web2py] Re: Upgrade web2py on webfaction

2010-11-23 Thread JoeCodeswell
Here's how I just upgraded to Version 1.89.5 on webfaction. It seemed to work. 'wp' is the name of my webFaction-application-directory which contains: $ tree -L 2 . |-- apache2 | |-- bin | |-- conf | |-- lib | |-- logs | `-- modules |-- bin |-- htdocs | `-- index.py |-- lib | `-- py

[web2py] Re: Development Partnership

2010-11-23 Thread vihang
Steve, Can you email me the project details. I have a team of web2py developers at my end. Vihang On Nov 24, 6:16 am, Steve Shepherd wrote: > Thanks Massimo... by the way I haven't been back to web2py for a while as I > had a role that didn't require development. > You and the team have made am

[web2py] Re: Creating vars in a URL

2010-11-23 Thread DenesL
Massimo, I have emailed you a patch for this and another smaller problem. On Nov 22, 8:23 pm, DenesL wrote: > To get a url you should use URL as explained > inhttp://web2py.com/book/default/chapter/04#URL > > and it should look something like > URL('reports','export_array_records',vars={'EndTi

Re: [web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Jonathan Lundell
On Nov 23, 2010, at 5:26 PM, Anthony wrote: > > On Nov 23, 8:10 pm, Timbo wrote: >> Set numthreads=0 in your options.py. See if you still see this >> behavior. > > options.py is just for running web2py as a Windows service, no? I'm > not running web2py as a Windows service when I observe the pr

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Anthony
On Nov 23, 8:10 pm, Timbo wrote: > Set numthreads=0 in your options.py.  See if you still see this > behavior. options.py is just for running web2py as a Windows service, no? I'm not running web2py as a Windows service when I observe the problem. Anthony

Re: [web2py] Re: Development Partnership

2010-11-23 Thread Steve Shepherd
Thanks Massimo... by the way I haven't been back to web2py for a while as I had a role that didn't require development. You and the team have made amazing advances. This is a stellar product with support beyond belief compared to the old days of Borland and Microsoft. I am a closet Foxpro programme

Re: [web2py] Re: trying to make auth.settings.login_next more dynamic

2010-11-23 Thread Michele Comitini
for one multiple login types, without using RXP 2010/11/24 mdipierro : > what is the problem you are trying to solve? > > On Nov 23, 4:41 pm, Michele Comitini > wrote: >> Massimo, >> to make  the auth.settings.login_next more dynamic could be this a solution? >> >> in the model: >> >> class Funct

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Timbo
Set numthreads=0 in your options.py. See if you still see this behavior. -tim On Nov 23, 7:03 pm, Timbo wrote: > Rocket is not dead but I did take several months off due to injury and > a job change.  I'm actually working on 1.2 which should see some > performance improvements on Windows. > > I

[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-23 Thread Timbo
Rocket is not dead but I did take several months off due to injury and a job change. I'm actually working on 1.2 which should see some performance improvements on Windows. I'll go download a copy of web2py and report back. -tim On Nov 22, 5:25 pm, Phyo Arkar wrote: > Hmm rocket server issue ag

[web2py] Re: Development Partnership

2010-11-23 Thread mdipierro
You may want to look among people who signed up on experts4solutions.com On Nov 23, 6:26 pm, Steve Shepherd wrote: > I am looking for a Web2Py developer or team that can work with me on a new > project. > The application is a Saas service that charges customers monthly so I am > happy to give a %

[web2py] Re: trying to make auth.settings.login_next more dynamic

2010-11-23 Thread mdipierro
what is the problem you are trying to solve? On Nov 23, 4:41 pm, Michele Comitini wrote: > Massimo, > to make  the auth.settings.login_next more dynamic could be this a solution? > > in the model: > > class FunctorFactory(object): >     def __init__(self, f=lambda:None): >         self.function =

[web2py] Development Partnership

2010-11-23 Thread Steve Shepherd
I am looking for a Web2Py developer or team that can work with me on a new project. The application is a Saas service that charges customers monthly so I am happy to give a % of ownership for working on the project. Would also look at hourly rate but this will depend on your experience and previous

Re: [web2py] about cron tasks

2010-11-23 Thread António Ramos
Print in a script called by cron does not print to web2py console. At least in my windows machine. Also i read the book and the examples of cron points to files in the file system forgetting the application folder. I think cron tasks should be in the application path and inside cron folder or othe

Re: [web2py] bug in the book or in the code? linkedin instruction

2010-11-23 Thread Kuba Kucharski
> a solution can be putting a new action similar to the following in the > controller: > > @auth.requires_login() > def onlogin_add_permission(): >  if not auth.has_permission(auth.user_group(auth.user.id), 'create', >  'my_table'): >      auth.add_permission(auth.user_group(auth.user.id),'create',

Re: [web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-23 Thread Kenneth Lundström
> It's the standard "You don't have permission to access /admin/default/ index on this server." I know it's silly, and I've went through most of the files available on how to supposedly fix this, but I can't seem to get it to work. You seem to have two different problems. I tried to access ad

[web2py] trying to make auth.settings.login_next more dynamic

2010-11-23 Thread Michele Comitini
Massimo, to make the auth.settings.login_next more dynamic could be this a solution? in the model: class FunctorFactory(object): def __init__(self, f=lambda:None): self.function = f def __call__(self): return self.function() def __str__(self): return str(self

Re: [web2py] Beginner Auth problem

2010-11-23 Thread appydev
Thank you very much for the help. 2010/11/23 appydev > Greetings. > > I have a problem, I hope you can help me. > > I have two models: Teacher, Student. Each with different attributes. > > It occurred to me to implement them, linking tables: > > db.define_table('teacher', >

[web2py] Re: web2py SSL + Apache + mod_wsgi issues on Ubuntu 8.08 VM machine

2010-11-23 Thread Hybride
> What kind of a problems do you have? It's the standard "You don't have permission to access /admin/default/ index on this server." I know it's silly, and I've went through most of the files available on how to supposedly fix this, but I can't seem to get it to work. > Your are receiving that wa

Re: [web2py] bug in the book or in the code? linkedin instruction

2010-11-23 Thread Michele Comitini
Kuba, you are right, sadly it does not... ;-) a solution can be putting a new action similar to the following in the controller: @auth.requires_login() def onlogin_add_permission(): if not auth.has_permission(auth.user_group(auth.user.id), 'create', 'my_table'): auth.add_permission(auth

Re: [web2py] Re: TOP10 list

2010-11-23 Thread Kenneth Lundström
Calculation is a lot more complicated then just a sum. I have to select data from 3-4 tables and then do the calculations. Maybe your second suggestion is the solution. How would you maintain the list so ten biggest rows is on the list and the list stays in correct order? Kenneth Dependi

[web2py] Re: TOP10 list

2010-11-23 Thread Alex
Depending on how complicated the calculation is, you can *may* be able to do the calculation in the DAL. If it's just a simple sum, you can use SUM(), then then orderby descending the SUM() amount and limitby=(0,10). Otherwise, you could always create a sorted List and as you iterate through each

[web2py] Re: Beginner Auth problem

2010-11-23 Thread mr.freeze
This may help: http://www.web2pyslices.com/main/slices/take_slice/102 On Nov 23, 3:58 pm, mdipierro wrote: > No. You can make a SQLFORM.factory(table1,table2) but it would no DB > IO so after accepts you would have to do some manual work > > On Nov 23, 3:46 pm, appydev wrote: > > > Thank you ver

Re: [web2py] TOP10 list

2010-11-23 Thread Bruno Rocha
I think you are in need of limitby=(start,end) partners = db(db,partners.id>0)select(limitby=(0,10)) 2010/11/23 Kenneth Lundström > Hello list, > > I惴 trying to make a TOP10 list but don愒 know how :=( > > First I select the partners: >partners = db(db.partners.id > 0).select() > >for

[web2py] Re: Beginner Auth problem

2010-11-23 Thread mdipierro
No. You can make a SQLFORM.factory(table1,table2) but it would no DB IO so after accepts you would have to do some manual work On Nov 23, 3:46 pm, appydev wrote: > Thank you very much for your response. > > But I still have a doubt: > > Is it possible to modify the registration form to insert da

[web2py] Re: TOP10 list

2010-11-23 Thread GoldenTiger
I need a bit more information show me your define_table from models, and write an example of TOP10 list On 23 nov, 22:35, Kenneth Lundström wrote: > Hello list, > > I m trying to make a TOP10 list but don t know how :=( > > First I select the partners: >      partners = db(db.partners.id > 0).se

Re: [web2py] Re: Beginner Auth problem

2010-11-23 Thread appydev
Thank you very much for your response. But I still have a doubt: Is it possible to modify the registration form to insert data into two tables? where one of the tables is auth_user. 2010/11/23 mdipierro > > > On Nov 23, 7:40 am, appydev wrote: > > Greetings. > > > > I have a problem, I hope

[web2py] is_in_db error message translation

2010-11-23 Thread Richard Vézina
Hello, I try this : db.table1.field1.requires=\ IS_IN_DB(db,'othertable.field1',orderby=('field1'),error_message=T('value not available')) But not working... How may I translate the IS_IN_DB error message? Should we have an other attribute for IS_IN_DB function? Richard

[web2py] TOP10 list

2010-11-23 Thread Kenneth Lundström
Hello list, I´m trying to make a TOP10 list but don´t know how :=( First I select the partners: partners = db(db.partners.id > 0).select() for partner in partners: sales = db(db.sales.partner == partner).select() make some calculations and get a value for the customer.

Re: [web2py] How could I send a email to every members?

2010-11-23 Thread Phyo Arkar
select all memebers , loop throught them and send , it will be very simple. On Wed, Nov 24, 2010 at 3:58 AM, David Liu wrote: > Hi everyone, > > Hope this email finds you well. I have a question about how to send a > email to every members? > > For example, I have a table named meeting like foll

Re: [web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread Phyo Arkar
No it will break other stuff too , which already use redirection inplace. Just Let developer know that doing so will cause minor trust issue , and there is way to prevent it. On Wed, Nov 24, 2010 at 1:40 AM, mdipierro wrote: > checked the code and I do not see any counter-indication in adding >

[web2py] Re: jqgrid question

2010-11-23 Thread William
yes On Nov 23, 3:41 pm, mdipierro wrote: > are you using plugin_wiki? > > On Nov 23, 2:16 pm, William wrote:> I want to display > a jqgrid table on the web, I set that the table > > shows 20 records as default. And right now I have 23 records in total. > > Therefore, its page number should be 2

[web2py] How could I send a email to every members?

2010-11-23 Thread David Liu
Hi everyone, Hope this email finds you well. I have a question about how to send a email to every members? For example, I have a table named meeting like follows: db.define_table('meeting', Field('title', 'string'), Field('time', 'datetime'), Field('description', 'text'), Field('

Re: [web2py] Re: Suggested patch to DAL

2010-11-23 Thread Phyo Arkar
if you like , you can work onto DAL.py brad. new design of DAL.py is gonna be more powerful, and will be a lot more modular but it will take some chunk of time so we regard it as low priority. On Wed, Nov 24, 2010 at 12:26 AM, brad wrote: > My mistake, Massimo. Sorry. > > On Nov 22, 10:40 pm, md

[web2py] Re: Beginner Auth problem

2010-11-23 Thread mdipierro
On Nov 23, 7:40 am, appydev wrote: > Greetings. > > I have a problem, I hope you can help me. > > I have two models: Teacher, Student. Each with different attributes. > > It occurred to me to implement them, linking tables: > > db.define_table('teacher', >                         Field('person',

[web2py] Re: jqgrid question

2010-11-23 Thread mdipierro
are you using plugin_wiki? On Nov 23, 2:16 pm, William wrote: > I want to display a jqgrid table on the web, I set that the table > shows 20 records as default. And right now I have 23 records in total. > Therefore, its page number should be 2. However, If I don't click the > bottom-right, its pa

[web2py] jqgrid question

2010-11-23 Thread William
I want to display a jqgrid table on the web, I set that the table shows 20 records as default. And right now I have 23 records in total. Therefore, its page number should be 2. However, If I don't click the bottom-right, its page number is always 3, how can I do to correct it? Thank you for your he

[web2py] Re: How do I submit a patch or addition to Web2Py?

2010-11-23 Thread mdipierro
email me. ;-) On Nov 23, 2:13 pm, NuclearDragon wrote: > I have a small change I implemented in the requires_login decorator of > Auth, that I wanted to submit for folks to check out, and potentially > be added to Web2Py. How do I go about creating a patch? What format > should it be in? Do I jus

[web2py] How do I submit a patch or addition to Web2Py?

2010-11-23 Thread NuclearDragon
I have a small change I implemented in the requires_login decorator of Auth, that I wanted to submit for folks to check out, and potentially be added to Web2Py. How do I go about creating a patch? What format should it be in? Do I just commit to trunk? Thanks!

Re: [web2py] 'this or that' request with a url

2010-11-23 Thread Lorin Rivers
Jonathan, Sweet! That set me on the right path! ../?foo="something"&bar="something_else"&other="this"&other="that" gives me what I want, which is: request.var['foo']: "something" request.var['bar']: "something_else" request.var['bar']: ["this", "that"] On Nov 23, 2010, at 9:34 , Jonathan Lun

[web2py] Re: how do I load a database CSV dump into GAE?

2010-11-23 Thread howesc
correct. actually the original bulkloader was deprecated a while ago, and unless i missed something my link above is to the latest documentation about the bulkloader. i use it with the automatic configuration so i have not written the transformers. cfh On Nov 22, 4:08 pm, Richard wrote: > unfo

[web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread mdipierro
checked the code and I do not see any counter-indication in adding this check but one: If a user were to implement something like OpenID or CAS on top of Auth, it would not work. What an OpenID provider does (redirect to another side after login) is exactly what you are trying to prevent. So ther

Re: [web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread Bruno Rocha
I think this can to be default (security matters), but needs to be configurable. def avoid_external_next(): if request.controller=='default' and request.function=='user': if request.vars._next and request.vars._next.startswith('http'): del request.vars._next at the models leve

[web2py] Re: output

2010-11-23 Thread mdipierro
My guess is that you have a python data structure that contains the items and the interest. I would extend this data structure to contain the result of the computation, pass it to the view, render it as you did in PHP. If you choose to compute the "current value" in the view, I would not see anythi

[web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread mdipierro
Actually I appreciate you raising this issue and this is a healthy discussion. Security issues are very important for everybody here so thank you for bringing this up. Although I do not think this is a major issue I agree that it should be avoided. One way to void is by adding this in one of your

[web2py] Re: Suggested patch to DAL

2010-11-23 Thread brad
My mistake, Massimo. Sorry. On Nov 22, 10:40 pm, mdipierro wrote: > Talking about sql.py or dal.py. dal.py is an experimental rewrite of > sql.py. dal.py is not used in web2py. dal.py has not been updated in > long time. > > Massimo > > On Nov 22, 8:48 pm, Mariano Reingart wrote: > > > > > > > >

[web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread Richard G
Sorry, I am not saying that a web2py site is susceptible to CSRF. I meant that a web2py site could be used 'in the process' to perform a request that match these criteria on another site. I find it weird to click on a link that is going to a legitimate web2py site, and loads this legitimate web2py

Re: [web2py] Re: list:string thoughts

2010-11-23 Thread Bruno Rocha
I deleted my database, redefined the tables and now it works. I found the problem. First defined Field('valores') After some values inserted, and some deletions, I changed to Field('valores','list:string') But this still renders pure strings '|x|x|' changing fields from 'string' to 'list:str

[web2py] output

2010-11-23 Thread pftpft
I'm new to the MVC structure and am trying to figure out where things go. Let's say I've got a group of items. The index page lists them with a link to each. On the item page, it runs a detailed calculation and prints various output. For example, Item 1 Built in 2007. Initial value $1,000 2008

[web2py] Re: Potential site trust abuse with default web2py setting?

2010-11-23 Thread mdipierro
What you suggest is indeed possible but... This is not an example of CRSF. CRSF is when a malicous site redirects the user to a site where the user is already authenticated (a web2py site) and forces the user to perform action (for example submit a form). web2py prevents this by hiding a formkey i

[web2py] Potential site trust abuse with default web2py setting?

2010-11-23 Thread Richard G
Howdy all, In web2py I've noticed a number of methods in gluon/tools.py that utilize client input to determine site flow: if next == DEFAULT: next = request.get_vars._next \ or request.post_vars._next \ or self.settings.login_next and subsequent if next

[web2py] Re: list:string thoughts

2010-11-23 Thread mdipierro
This is what I get from shell: >>> db.define_table('doacao', ...Field('animais','list:string'), ...Field('valores','list:string')) >>> order = [(12,1,21.4),(15,1,45.3)] >>> doacao = dict( ... animais=[ord[0] for ord in order], ... valores=[ord[2] for ord in order]

[web2py] Possible BUG: Hidden fields in SQLFORM with custom render template

2010-11-23 Thread Josh Jaques
Rendering SQLFORMs with a custom template, any hidden fields I create, as well as the hidden ID field are not displayed in the form until a call to accepts. I think this might be a bug because the same form rendered without a custom template will have the ID and hidden fields without calling ac

Re: [web2py] Re: list:string thoughts

2010-11-23 Thread Bruno Rocha
This is what I have: order = [] for product_id, qty, val in session.cart: order.append(( product_id, qty, val )) store.define_table('doacao', Field('user_id',db.auth_user,requires=IS_IN_DB(db, db.auth_user.id)), Field('animais','list:string'),

[web2py] Re: list:string thoughts

2010-11-23 Thread mdipierro
No it does not. This is what I get: >>> db.define_table('name',Field('value','list:string')) >>> db.name.insert(value=['hello','world']) 1 >>> db.name(1).value ['hello', 'world'] >>> for row in db(db.name).select(): print row at 0x1698f70>, 'value': ['hello', 'world'], 'id': 1, 'delete_record':

[web2py] Jqgrid via plugin_wiki and reference

2010-11-23 Thread JmiXIII
Hello, I'm happy with the plugin_wiki jqgrid widget. Yet consider(genrated from wizard): db.define_table('t_piece', Field('id','id', represent=lambda id:SPAN(id,' ',A('view',_href=URL('piece_read',args=id, Field('f_code', type='string', unique=True, label=T('Code')

Re: [web2py] Re: list:string thoughts

2010-11-23 Thread Bruno Rocha
HI, I am taking advantage of this thread to solve a doubt about list:string, How can I get the values from list:string field rendered as a Python 'list' ? Is there a ready way in DAL, or I need to use .split() and .join() ? look: >>> row = db(db.doacao.user_id==23).select()[0] >>> row at 0x930a

Re: [web2py] Re: ERP projects

2010-11-23 Thread Bruno Rocha
Our system is called SATLite (Simple Agile Tool - Lite), this is a work in progress and is being developed by 4 people, we did't decide yet if we are going to serve the app (free for use) or opening the source. This is a really tiny and simple tool for keeping track of agile projects and its commo

Re: [web2py] 'this or that' request with a url

2010-11-23 Thread Jonathan Lundell
On Nov 23, 2010, at 6:28 AM, Lorin Rivers wrote: > > How can I perform an 'OR' request with a url? Or pass a list using a url? > > I have 'AND' figured out… I'm not quite sure what you're asking here, but I'm guessing that you're interpreting the '&' in a query string as 'and'. But it's not; it

Re: [web2py] Re: ERP projects

2010-11-23 Thread Vinicius Assef
+1 If we just use DAL, we can count on web2py's transaction management to make the app portable among supported databases. So, Sqlite may be used in development and testing environments. If you want to run in a really small business, Sqlite could be acceptable, too. I know some systems developed

Re: [web2py] Re: ERP projects

2010-11-23 Thread Michele Comitini
I agree, it is true that in many little environments, there is only one person writing and a few reading so sqlite would be more than enough. 2010/11/23 mdipierro : > yes it should use dal and work with all supported databases, yet I > would not run an ERP on a system without transactions. > > On

[web2py] Re: ERP projects

2010-11-23 Thread mdipierro
yes it should use dal and work with all supported databases, yet I would not run an ERP on a system without transactions. On Nov 23, 9:07 am, Michele Comitini wrote: > IMHO the question is not about having a database, the question is that > the ERP must > use only DAL for data management and must

Re: [web2py] Re: ERP projects

2010-11-23 Thread Richard Vézina
My preference go to postgresql... I think it is not a matter anyway since web2py can work with many differents dbms. But if we have to speed up as point in a thread last week we will have to work at the db layer to improve the schema and then a particular dbms will emerge... Richard On Tue, Nov 2

Re: [web2py] Re: ERP projects

2010-11-23 Thread Michele Comitini
IMHO the question is not about having a database, the question is that the ERP must use only DAL for data management and must run on any supported database not only relational ones. mic 2010/11/23 mdipierro : > I think a relational database for an ERP is a must and those ERPs all > support them.

[web2py] Re: auth_permission in multiple db configuration

2010-11-23 Thread kralin
yes, my db objects are unfortunately too complex to be used with CRUD. so no prob. it worked well! thanks a lot, again ;) hope this helps someone else... On 23 Nov, 15:37, mdipierro wrote: > On Nov 23, 8:31 am, kralin wrote: > > > Thanks Massimo, > > this works, but will behave erratic if multip

[web2py] Re: auth_permission in multiple db configuration

2010-11-23 Thread mdipierro
On Nov 23, 8:31 am, kralin wrote: > Thanks Massimo, > this works, but will behave erratic if multiple dbs have two table > with the same name. > better than nothing... > I think I can resolve this by giving "db1.table1" and "db2.table1" > instead of just the table name. Yes you can do that: Unle

Re: [web2py] where to place sizes (and other properties) ?

2010-11-23 Thread Branko Vukelic
This looks like a CSS question, rather than web2py. Any level of cascade is acceptable, and the best place can be anywhere depending on what you want. Personally, I'd move everything into an external CSS and link from the layout.html (the way you'd usually link it). I think web2py layouts are not

[web2py] Re: auth_permission in multiple db configuration

2010-11-23 Thread kralin
Thanks Massimo, this works, but will behave erratic if multiple dbs have two table with the same name. better than nothing... I think I can resolve this by giving "db1.table1" and "db2.table1" instead of just the table name. It looks like a simple string match is performed in the has_permittion met

[web2py] 'this or that' request with a url

2010-11-23 Thread Lorin Rivers
How can I perform an 'OR' request with a url? Or pass a list using a url? I have 'AND' figured out… -- Lorin Rivers Mosasaur: Killer Technical Marketing 512/203.3198 (m)

[web2py] Re: Inserting custom field types broken

2010-11-23 Thread mdipierro
Can you post code to reproduce this. It will save some time and we can fix it sooner. On Nov 23, 7:53 am, Ishbir wrote: > Hey there, > > There seems to be a bug in web2py which pops up while inserting a > record to a table with a custom field type. > > How to reproduce: > - Make a table with a cu

[web2py] [BUG] Inserting custom field types broken

2010-11-23 Thread Ishbir
Hey there, There seems to be a bug in web2py which pops up while inserting a record to a table with a custom field type. How to reproduce: - Make a table with a custom field - Try inserting a record - The record would come out as None - Try updating the record with the custom value. It shows this

[web2py] Re: ERP projects

2010-11-23 Thread mdipierro
I think a relational database for an ERP is a must and those ERPs all support them. At the university we have peoplesoft+oracle and ~30,000 users. Turns out the ERP is not a high traffic app and it runs on one VPS (with replication for high availability). I am sure any web2py ERP will be just fine

[web2py] Re: ERP projects

2010-11-23 Thread newnomad
It's really great that there are 3 ERP's in the works, I'd love to switch from tryton to a web2py based system; http://code.google.com/p/gestionlibre/ https://bitbucket.org/yamandu/yamachine-erp/ and a number 3 which I cannot find... However will any of those ever work without a relational databa

Re: [web2py] plugin_wiki.widget:dealing with variables

2010-11-23 Thread Bruno Rocha
mydata = '1,2,3' or mydata = [1,2,3] plugin_wiki.widget('pie_chart',data=mydata,names='a,b,c',width=300,height=150,align='center') 2010/11/23 shubham > how to use variables inside > > plugin_wiki.widget('pie_chart',data='1,2,3',names='a,b,c',width=300,height=150,align='center') > syntax?? > >

[web2py] Re: plugin_wiki.widget:dealing with variables

2010-11-23 Thread mdipierro
You should be able to pass a list. On Nov 23, 2:29 am, shubham wrote: > how to use variables inside > plugin_wiki.widget('pie_chart',data='1,2,3',names='a,b,c',width=300,height=150,align='center') > syntax?? > > i want to replace 1,2,3 inside data attribute with variables..can > anyone suggest a

[web2py] Re: where to place sizes (and other properties) ?

2010-11-23 Thread mdipierro
Talking about the default layout.html or one of those from http://.../layouts? Nobody is maintaining the latter. They were generated automatically from free templates found online. On Nov 23, 7:48 am, Stef Mientki wrote: > hello, > > I just downloaded one of the layouts, > and I stumbled about th

[web2py] [BUG] Inserting custom field types broken

2010-11-23 Thread Ishbir
Hey there, There seems to be a bug in the latest version of web2py. Steps: 1. Create a table with a custom field 2. Try inserting the record 3. You'll notice that the custom field evaluates to None 4. Try updating the record, the custom field will show this time. Workaround: 1. Insert the record

[web2py] plugin_wiki.widget:dealing with variables

2010-11-23 Thread shubham
how to use variables inside plugin_wiki.widget('pie_chart',data='1,2,3',names='a,b,c',width=300,height=150,align='center') syntax?? i want to replace 1,2,3 inside data attribute with variables..can anyone suggest a way??

[web2py] where to place sizes (and other properties) ?

2010-11-23 Thread Stef Mientki
hello, I just downloaded one of the layouts, and I stumbled about the huge amounts of size / color definitions. I realize that this is not a typical web2py question, but with web2py and it's layout inheritance the problem becomes even bigger. I wonder what's the best place to organize size (and ot

Re: [web2py] Re: Delay to load images on webfaction

2010-11-23 Thread Bruno Rocha
Thank you Villas 2010/11/23 villas > > I will use PIL to create > > small thumbs (just have to figure out how to process every image on > > /uploads, create the thumb and insert this path do db) > > Hi Bruno, > > With regards the above, some code here may help you forward a > little... > > http:

[web2py] Re: auth_permission in multiple db configuration

2010-11-23 Thread mdipierro
You just need to remove the validator: db.auth_permission.table_name.requires = None On Nov 23, 6:19 am, kralin wrote: > Hi, > I've got a sistem with multiple db, some are SQLlite, some are > postgresql and one in MSSQL. > is there a way to use auth authorization within tables that do not > bel

[web2py] Beginner Auth problem

2010-11-23 Thread appydev
Greetings. I have a problem, I hope you can help me. I have two models: Teacher, Student. Each with different attributes. It occurred to me to implement them, linking tables: db.define_table('teacher', Field('person', length=64), requires=IS_IN_DB(db, 'auth_user.uuid')),

[web2py] Re: Delay to load images on webfaction

2010-11-23 Thread villas
> I will use PIL to create > small thumbs (just have to figure out how to process every image on > /uploads, create the thumb and insert this path do db) Hi Bruno, With regards the above, some code here may help you forward a little... http://www.web2pyslices.com/main/slices/take_slice/62 Regar

  1   2   >