[web2py] Re: loop created forms

2012-05-14 Thread pbreit
Oh, yeah, you're not going to want to have tons of forms but instead id each form.

[web2py] Re: how to set text limitation in a div

2012-05-14 Thread Larry Weinberg
You want style of overflow:hidden I believe.

[web2py] Re: Conditional models

2012-05-14 Thread pbreit
Right now you can't have one model apply to two different controllers with conditional models. Copy/pasting should work but I would rarely advise that. Are you running into performance problems? Have you tried any other optimizations? 48 tables is kind of a lot but not crazy.

[web2py] how to set text limitation in a div

2012-05-14 Thread Vibhor Purandare
How to set text limitation (maxlength) in a div ? Text is going out of the div?

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Annet
Hi Yogesh, After trying different approaches, I decided to do the following: define a table 'Node' and a table 'person' referencing 'node' this gives me the opportunity to have a table 'organization' too. All other tables including 'address' reference the table 'node'. I added an extra field '

[web2py] Conditional models

2012-05-14 Thread Annet
I read some post about models influencing performance. At the moment I have all table definitions (48) in one file: 10_tables_db.py I'd like to make them conditional, however, most tables are used in two controllers, is it possible to put table definitions in: models/calendar/cmscalendar/10_tab

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
Hi Massimo, Thanks for telling me such undocumented trick to use other app's layout file. However I still think a built-in layout_jqm.html for scaffold app is cleaner than cross-app reference. Anyway, see my latest layout_jqm.html sample in ticket 797 http://code.google.com/p/web2py/issues/det

[web2py] Re: Why does jquery autocomplete not work in subview form after submission?

2012-05-14 Thread Annet
A while back Anthony helped me solve a similar problem. I have a jqueryui controller with the sources: def locality_autocomplete(): rows=db(db.Locality.name.like(request.vars.term+'%'))\ .select(db.Locality.name,distinct=True,orderby=db.Locality.name).as_list() result=[r['name']for r

Re: [web2py] Nested CRUD

2012-05-14 Thread Annet
> So if I could generate one form that allows you to create a customer, > complete with address, the management would become much more logical. In this case I'd use SQLFORM.factory: def create(): form=SQLFORM.factory(db.customer,db.address) if form.process().accepted: id = db.cu

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Yogesh
Annet, Trying similiar approach.. Little confused.. everytime i am able to submit multiple addresses for any registered user.. 1. User registers by default registration page. 2. After login, user fills up address and personal details. Both tables are linked to the Auth user table. I need to ensu

[web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Annet
In my database design I put the Addresses in a separate table. In the Address table I have a field aType with an IS_IN_SET validator for the types of addresses in the domain. IS_IN_SET([(1,'Permanent'),(2,'Current')],zero='select a value') I use SQLFORM.factory to create a custom form, but ther

Re: [web2py] Re: AttributeError: 'NoneType' object has no attribute 'fields'

2012-05-14 Thread Yogesh
Hello anthony, i will try this.. Though i remember me getting an error. will keep posting for errors if any.. thanks.. On Mon, May 14, 2012 at 6:22 PM, Anthony wrote: > After you define your custom auth_user table, you still have to call: > > auth.define_tables() > > Anthony > > On Monday, May

Re: [web2py] Re: Shipping Address, Billing Address - Model Design

2012-05-14 Thread Yogesh
Hello, I have used the *easiest approach first: put all the address fields in the "candidate" table.*Even the second approach is possible. But should i keep 2 seperate tables for both address types... Thanks... On Mon, May 14, 2012 at 10:57 PM, pbreit wrote: > Consider the easiest approach fir

[web2py] Re: Can/should {{super}} works even without a parent block?

2012-05-14 Thread Ray (a.k.a. Iceberg)
The point here is that the web2py out-of-box layout.html and the web2py.plugin.jqmobile.w2p layout contain different set of blocks. Sure I can change one of that manually. But wouldn't it be better if {{super}} can simply work no matter the parent block exists or not? That way I can even take o

Re: [web2py] Nested CRUD

2012-05-14 Thread Alec Taylor
Thanks, looks like this plugin will be helpful for that: http://dev.s-cubism.com/plugin_lazy_options_widget I'll find the book section and see what I can do. On Tue, May 15, 2012 at 1:18 AM, Richard Vézina wrote: > Think you should read the book section about more then one form per page and > ab

Re: [web2py] How to access facebook graph of logged in user

2012-05-14 Thread www.diazluis.com
greetings I have the same problem could you explain me the configuration that mensionas with an example? note: my hosting is WebFaction my domains are registered in Dattatec El lunes, 13 de junio de 2011 17:37:06 UTC-4:30, sebastian escribió: > > I had similar problems... fixed using dns names ra

[web2py] Re: loop created forms

2012-05-14 Thread Anthony
It's not the variable referring to the form that needs to be unique (you can simply append the forms together using CAT() or inside a DIV) -- rather, each form has a name stored in a hidden _formname field. It is set by specifying the "formname" argument to .accepts() or .processs(). f = SQLFOR

[web2py] Re: Why does jquery autocomplete not work in subview form after submission?

2012-05-14 Thread Larry Weinberg
I found a solution to this. I had to add a jQuery .on() handler for focus. Is this the best way to handle this? I guess this isn't a web2py problem, it's the nature of ajax/javascript/jquery I assume. Any way for web2py to magically fix this kind of thing? $(document).ready(function() {

[web2py] Re: loop created forms

2012-05-14 Thread lucas
i did try messing around with f = SQLFORM(db.opinions) f.vars.stuff.assignments... exec 'f%s = %s' % (i.id, f) if (exec 'f%s' % i.id).process().accepted: session.flash = 'Thank you for your opinion'

[web2py] How to post to impersonate without filling in form

2012-05-14 Thread weheh
I'm using grid to display a list of users. I have the user's name represented as a link with the user_id encoded. I want to impersonate the user when I click on the link. I haven't been able to figure out how to do that. So far, the best I can do is get to the impersonate form and enter the use

[web2py] URL based internationalization (apparent) bug

2012-05-14 Thread csantos
Hi, In my routes.py, I added: routers = dict( # base router BASE = dict(default_application = 'myapp'), myapp = dict(languages=['en', 'pt-br'], default_language='pt-br'), ) But that completely breaks the links to my static files. For instance, the URL "/myapp/static/images/poweredby.png" became

[web2py] Re: loop created forms

2012-05-14 Thread lucas
sure i can us the id from the table of sections. but how to i attach that id number to a variable and python recognize that "string" as a variable name that i can then access again for the form processing? i guess this is more of a python question now then a web2py. lucas

[web2py] Questions about background process using homemade task queue

2012-05-14 Thread pbreit
Is this something th scheduler should/couldl be used for?

[web2py] Re: SQLFORM not print the ID values ​​less and equal than zero from the referenced table

2012-05-14 Thread Eduardo Diaz
Thanks Massimo, *Ticket http://code.google.com/p/web2py/issues/detail?id=794 *

Re: [web2py] web2py and service authentication - Please help I am almost there

2012-05-14 Thread Ricardo Pedroso
On Sat, May 12, 2012 at 2:00 PM, david.waldrop wrote: > This is my 2nd attempt at trying to dig in and understand web2py services > and authorization.  I saw posts about various ways (digest, basic auth, > https, etc) fro securing web services, but am not sure which one to use.  In > my case I am

[web2py] Questions about background process using homemade task queue

2012-05-14 Thread cyan
Hi group, I am going to implement a homemade task queue as a background process for updating database, and I have some questions as below: 1. does a background process updating a database interfere with controller functions that operate on the same database? For example, if I have a task queu

[web2py] Re: Dynamic MySQL Database selection

2012-05-14 Thread Anthony
The connection string in the call to DAL() can be determined dynamically based on information in the request, such as an arg or a subdomain. How do you determine which institution a given request is associated with? Anthony On Monday, May 14, 2012 3:21:39 PM UTC-4, Craig wrote: > > I am testing

Re: [web2py] my app not works with web2py 1.99.7

2012-05-14 Thread Richard Vézina
Hello, I try one more time to upgrade to 1.99.7 today without succes. But now I know what append... It works fine, until I try to logon with a user... In shell it works fine, can access to any tables... Is there change to the logon process has been changed between 1.99.4 and 1.99.7? Thanks Ric

Re: [web2py] complex query with delete

2012-05-14 Thread Anthony
> > You may get exceptions from the database driver if the id list is empty. > Using Postgres, I do something like this: > > ids = db()._select(db.users_keywords.keyword_id, distinct=True) > if len(ids): > db((~db.keyword.id.belongs(ids)) & (db.keyword.dictionary == > dictionary)). > dele

[web2py] Re: loop created forms

2012-05-14 Thread Anthony
> > but how do i do that with soft-coded variable names when i don't know how > many DIV/sections i am going to have on a single page? or, what is the > best approach to soft-coding variable names in python to achieve that? > Is there something unique to each form? If so, use that to construct

Re: [web2py] complex query with delete

2012-05-14 Thread Cliff
Vincenzo, You may get exceptions from the database driver if the id list is empty. Using Postgres, I do something like this: ids = db()._select(db.users_keywords.keyword_id, distinct=True) if len(ids): db((~db.keyword.id.belongs(ids)) & (db.keyword.dictionary == dictionary)). delete()

[web2py] Re: GAE datastore: how to unindex a field?

2012-05-14 Thread howesc
is that controllable via index.yaml? On Monday, May 14, 2012 5:02:55 AM UTC-7, Felipe Meirelles wrote: > > Hi, > > I'm porting a commercial project from django + djangoappengine ( > http://www.allbuttonspressed.com/) to web2py and one thing I could'nt > find at all is how to manage per field inde

[web2py] Dynamic MySQL Database selection

2012-05-14 Thread Craig Matthews
I am testing Web2Py for use at my institution. We serve several other institutions. I have each institution set up in its own database (as in "use xxx;"). How can this be accomplished with the DAL in Web2Py? Thank you.

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Larry Wapnitsky
Here's what it's generating: Whitelisted Addresses