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

2012-05-14 Thread Larry Weinberg
I'm not sure if this is web2py question or javascript related issue. In an HTML view I am trying to call a subview with a form in it that has a jquery autocomplete attached to a text field in the form. I attach the autocomplete like this in the form view's document ready function:

Re: [web2py] complex query with delete

2012-05-14 Thread Vincenzo Ampolo
On 05/13/2012 02:50 PM, Anthony wrote: ids = db()._select(db.users_keywords.keyword_id, distinct=True) db((~db.keyword.id.belongs(ids)) (db.keyword.dictionary == dictionary)). delete() Anthony Thanks a lot! This is exactly what I was looking for! -- Vincenzo Ampolo

[web2py] Re: Unit Testing

2012-05-14 Thread Kimmo
I'd be interested in seeing this controller. Especially the part about running the unittests. On Wednesday, 9 May 2012 00:19:07 UTC+3, howesc wrote: while i would not call anything i have great tests or a wonderful example of testing, i have used doctests in controllers successfully.

Re: [web2py] To uuid or not?

2012-05-14 Thread Johann Spies
On 12 May 2012 21:04, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: what problems have you got moving the DB to another computer ? As I understand it the id's get rebuilt if you export a table as csv-file and import it on another computer. When the whole database gets exported and

[web2py] Shipping Address, Billing Address - Model Design

2012-05-14 Thread Yogesh Kamat
I am working on candidate employment tracking portal.. wherein the requirement is to collect Permanent Address, Current Address. Situation is similiar to Shipping and Billing Address scenario... Also how should i separate the address details in 2 different tables and link to main registration

[web2py] Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
Hi there, 1. I am working at my first mobile website recently. At first I spent (quite) some time to know and download the hard-to-find web2py.plugin.jqmobile.w2p, then I realize the main resource I need is just its views/plugin_jqmobile/layout.html, so it comes to an idea. Why not just pack

Re: [web2py] web2py - form to pass input to matplotlib

2012-05-14 Thread Massimo Di Stefano
Hi Massimo, thanks for you help! i'm going ahead with little steps, i stored your code in a web2py controller : mpl.py espone index, plot_interference i tried it without modification, or just changing the return function to : return dict(image=plot(data={'interferemce':[(x,x**2) for

Re: [web2py] To uuid or not?

2012-05-14 Thread Simon Lukell
As I understand it the id's get rebuilt if you export a table as csv-file and import it on another computer. When the whole database gets exported and imported the relationships stays consistent. Yes, I've learned this the hard way. Moving the database between computers is OK if you

[web2py] when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread simon
*In the following code I create a new table in db1. However when I open a second DAL connection to the same database the new table is not shown. Why is that?* * * *db1 = DAL('sqlite://storage.sqlite', folder=dbfolder, auto_import=True)* *print(db1.tables)* * * *db1.executesql(DROP TABLE IF

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Ross Peoples
I don't think you are supposed to open more than one connection to a SQLite database at a time. It is file-based and doesn't have multi-connection abilities like other databases like MySQL and PostgreSQL. On Monday, May 14, 2012 7:29:44 AM UTC-4, simon wrote: *In the following code I create a

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

2012-05-14 Thread Felipe Meirelles
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 indexes on App Engine. My project is database intensive so every entity is written hundreds of thousend times a day

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Massimo Di Pierro
I would like to see the implementation. I am pretty sure this will break the bytecode compilation of apps. On Monday, 14 May 2012 04:30:23 UTC-5, Ray (a.k.a. Iceberg) wrote: Hi there, 1. I am working at my first mobile website recently. At first I spent (quite) some time to know and

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

2012-05-14 Thread Anthony
After you define your custom auth_user table, you still have to call: auth.define_tables() Anthony On Monday, May 14, 2012 6:44:45 AM UTC-4, Yogesh Kamat wrote: AttributeError: 'NoneType' object has no attribute 'fields' Getting the above mentioned error. I have just created a custom

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Anthony
On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote: I would like to see the implementation. I am pretty sure this will break the bytecode compilation of apps. {{extend response.layout or layout.html}} Yes -- to compile, the view to extend has to be known at compile time, but

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

2012-05-14 Thread Anthony
Can you pack and attach a minimal app the reproduces the problem? On Monday, May 14, 2012 2:08:47 AM UTC-4, Larry Weinberg wrote: I'm not sure if this is web2py question or javascript related issue. In an HTML view I am trying to call a subview with a form in it that has a jquery

Re: [web2py] To uuid or not?

2012-05-14 Thread Ross Peoples
Some databases allow you to temporarily turn off auto-generating IDs so that you can import a table keeping its original IDs intact. I wrote a database abstraction layer a few years back for another project that specifically allowed you to make an identical copy of a database from a MySQL

Re: [web2py] To uuid or not?

2012-05-14 Thread Massimo Di Pierro
Definitively. Please open a ticket about this. Thanks Ross. On Monday, 14 May 2012 07:58:57 UTC-5, Ross Peoples wrote: Some databases allow you to temporarily turn off auto-generating IDs so that you can import a table keeping its original IDs intact. I wrote a database abstraction layer a

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread simon
According to the sqlite FAQs http://www.sqlite.org/faq.html#q5 Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however. On Monday,

Re: [web2py] To uuid or not?

2012-05-14 Thread Ross Peoples
I have created issue 796: http://code.google.com/p/web2py/issues/detail?id=796 While creating the issue, I noticed that I had made an error with the MSSQL part. This was corrected in the issue.

[web2py] Re: preferences for internationalization of the db content and URL structure with web2py

2012-05-14 Thread Yuriy Sosov
Flatpages plugin https://groups.google.com/forum/?fromgroups#!topic/web2py/sgbPpPZ4QX8 answered all my questions at this time Thanks

Re: [web2py] To uuid or not?

2012-05-14 Thread Johann Spies
On 14 May 2012 15:36, Ross Peoples ross.peop...@gmail.com wrote: I have created issue 796: http://code.google.com/p/web2py/issues/detail?id=796 Thanks Massimo, Ross. This will be of great help. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Larry Wapnitsky
Even if I remove fieldname, et.al. after the table name, no data. On Friday, May 11, 2012 8:13:59 PM UTC-4, Larry Wapnitsky wrote: 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

[web2py] Re: preferences for internationalization of the db content and URL structure with web2py

2012-05-14 Thread yus
Flatpages plugin https://groups.google.com/forum/?fromgroups#!searchin/web2py/Mariano$20Reingart$20$20flatpages answered all my questions at this time and is a good point to start with Thanks On Monday, April 23, 2012 1:38:24 AM UTC+2, yus wrote: Hi all, I just joined this group. I am new

[web2py] Re: preferences for internationalization of the db content and URL structure with web2py

2012-05-14 Thread yus
Flatpages plugin https://groups.google.com/forum/?fromgroups#!searchin/web2py/Mariano$20Reingart$20$20flatpages answered all my questions at this time and is a good point to start with Thanks

[web2py] loop created forms

2012-05-14 Thread lucas
hello one and all, i am trying to create a form to takes people's opinion within each section contained by a DIV. so my html page might have one or ten sections, each one containing a loop created form. so here is some pseudo code: first the table structure:

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Ray (a.k.a. Iceberg)
On Monday, May 14, 2012 8:56:41 PM UTC+8, Anthony wrote: On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote: I would like to see the implementation. I am pretty sure this will break the bytecode compilation of apps. {{extend response.layout or layout.html}} Yes -- to

[web2py] Re: loop created forms

2012-05-14 Thread Anthony
Where's the logic for processing the form? Note, if you've got multiple forms on the same page, they each need a unique name -- see http://web2py.com/books/default/chapter/29/7#Multiple-forms-per-page. Anthony On Monday, May 14, 2012 10:12:30 AM UTC-4, lucas wrote: hello one and all, i am

[web2py] Nested CRUD

2012-05-14 Thread Alec Taylor
Is it possible to have a nested CRUD form? From a logical perspective it sometime doesn't make sense, for example, to add an Address before you add a Customer. db.define_table('address', Field('line1','string', required=True), Field('line2','string'), Field('suburb','string',

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Ross Peoples
In my experience, can doesn't always mean should. There may be an issue with db2 not seeing the table definitions from db1. For testing, do something like this to explicitly share the test table definition: def define_tables(db, migrate=False): db.define_table('test', Field('testfield'),

Re: [web2py] Nested CRUD

2012-05-14 Thread Richard Vézina
Think you should read the book section about more then one form per page and about component. What you want to do is hide a second form in the same page... Those form should be embeded in the page as component en then you have to write the proper logic in ajax and jQuery to make appears your

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

2012-05-14 Thread Ray (a.k.a. Iceberg)
Hi, There is a {{super}} syntax to bring the parent block. Fine. (See its doc here. http://web2py.com/books/default/chapter/29/5#Blocks-in-views ) But if using {{block undefined_block}}{{super}}{{end}} will generate error ticket. This brings trouble if I am switching different layouts for some

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
I'm reading through the profile log, not that I'm an expert on profiling or anything, but I do have a few possible tips: 1. Most of your calls are done in ~86 ms. That's pretty respectable. 2. Most of your time is spent on database calls, with compiling being the second biggest time

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

2012-05-14 Thread Ross Peoples
While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired behavior here. Otherwise, returning an empty string would make troubleshooting difficult if you accidentally mistyped the name of

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
1. Your adviewer/viewads makes 10 calls to the database. Try to optimize this either by writing fewer queries, creating a view, and/or only selecting fields that you need. Also make sure you get the criteria right so that you (ideally) don't have any extra, unneeded rows.

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

2012-05-14 Thread Ross Peoples
Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote: While not the prettiest solution, you can always use {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but I think an exception is the desired

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

2012-05-14 Thread Ray (a.k.a. Iceberg)
Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote: Correction, that should be: {{try:}}{{super}}{{catch:pass}} On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
Hello, I wonder if some of the speed problem that web2py has could be address by translate some of the web2py module into C?? There is already many walk around for speed problem, but could there is some major speed improvement by rewrite some of web2py fondation into C? I am just curious about

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
On Monday, May 14, 2012 11:50:06 AM UTC-4, Anthony wrote: 1. Your adviewer/viewads makes 10 calls to the database. Try to optimize this either by writing fewer queries, creating a view, and/or only selecting fields that you need. Also make sure you get the criteria right

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Ross Peoples
The problem with doing it as a C module is that it would have to be compiled. I know that this is something that has been mentioned before but was shot down because web2py wouldn't be easily accessible, modified, etc, which is the goal of web2py. Alternatively, maybe running web2oy in PyPy

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
This is cool : cache.ram.clear(key) I didn't thought about it, I figure out that you trigger this in the function that create new records for a given cached select... Good trade off with caching and up to date select. Thank for this one Ross. Richard On Mon, May 14, 2012 at 12:02 PM, Ross

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Richard Vézina
Yes right, it could not be anymore included into a single zip file that you just unpack and good to go. About PyPy, I read long time ago from someone that has make works web2py with it that there was not that much speed improvement. Richard On Mon, May 14, 2012 at 12:06 PM, Ross Peoples

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Niphlod
the issue is definitely the missing definition of the table on the second connection. Remember that DAL does NOT introspect databases. You can have potentially 31098312098 tables in a database, and define only one, and you'll be able to access that via DAL (of course with executesql there is

[web2py] Re: Can't make db calls with scheduler

2012-05-14 Thread Niphlod
definitely the way to go, I faced the issue before myself, sorry not to have reported that ;-) I don't think it's a issue per se, scheduler is quite nice to manage at low level. Il giorno lunedì 14 maggio 2012 04:46:11 UTC+2, Yarin ha scritto: Sorry, figured this out- db calls made with the

Re: [web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Richard Vézina
Niphlod, I thought that with postgres you were stock at 1000 columns :) Richard On Mon, May 14, 2012 at 12:19 PM, Niphlod niph...@gmail.com wrote: the issue is definitely the missing definition of the table on the second connection. Remember that DAL does NOT introspect databases. You can

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
If you want to use db.executesql() but remain portable, you can still have the DAL generate the SQL for you by using the ._select() method: db.executesql(db(query)._select(...)) Obviously in that case you don't get to hand optimize the SQL, but you still get the speed advantage of not

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread simon
But the auto_import is supposed to read the data definitions from the database so you don't have to define_table On Monday, 14 May 2012 17:19:24 UTC+1, Niphlod wrote: the issue is definitely the missing definition of the table on the second connection. Remember that DAL does NOT introspect

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread pbreit
DAL *ONLY* know about tables defined in your model files. DAL has *ZERO* knowledge about what your DB actually looks like.

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

2012-05-14 Thread Ross Peoples
Sorry, been switch between languages a lot this morning. If you are still getting the error, then I'm not sure. Maybe someone else has a thought. On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails

[web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Remco K
Thank you very much, Anthony! This was exactly what i was looking for. Problem solved. Op vrijdag 11 mei 2012 19:07:32 UTC+2 schreef Anthony het volgende: 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

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Anthony
On Monday, May 14, 2012 12:06:28 PM UTC-4, Ross Peoples wrote: The problem with doing it as a C module is that it would have to be compiled. I know that this is something that has been mentioned before but was shot down because web2py wouldn't be easily accessible, modified, etc, which is

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread pbreit
Aren't 135 table definitions going to be a problem in a high volume app? Aren't many/most of those 85k-100k function calls going to examining/parsing all those tabledefs?

Re: [web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Richard Vézina
I merge autocomplete with SELECT_OR_ADD_OPTION and name it : AutocompleteWidgetSelectOrAddOption It available here at the bottom of the thread : https://groups.google.com/forum/?fromgroups#!topic/web2py/9KamKgHKUwU Or I will create a web2py slice soon, I hope... Richard On Mon, May 14, 2012

Re: [web2py] Re: Unit Testing

2012-05-14 Thread Christian Foster Howes
Attached (assuming google groups accepts it) is my unit testing controller that i run on GAE development SDK. also note that my db connection is defined as: db = DAL('google:datastore') # connect to Google BigTable if request.test_db or request.function == _TEST: db =

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

2012-05-14 Thread Anthony
Can't you put an empty version of that block in your jQuery Mobile layout as well? Anthony On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote: Guess you mean {{try:}}{{super}}{{except: pass}} Unfortunately it fails too. So a fix is a must? Regards, Ray On Monday,

Re: [web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Remco K
That would be nice. I think there are more people who can use this. 2012/5/14 Richard Vézina ml.richard.vez...@gmail.com I merge autocomplete with SELECT_OR_ADD_OPTION and name it : AutocompleteWidgetSelectOrAddOption It available here at the bottom of the thread :

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread simon
From the book: If we just need access to the data but not to the web2py table attributes, we get away without re-defining the tables but simply asking web2py to read the necessary info from the metadata in the .table files: 1. 2. 3. from gluon import DAL, Field db =

[web2py] Re: loop created forms

2012-05-14 Thread pbreit
So how would you do that in Python? Would you need to use vars()['form%s' % i] or can you do a list or dict of forms?

[web2py] Re: loop created forms

2012-05-14 Thread lucas
yes, anthony, i knew of that section in the manual. an i see how and why it is done when you can hard-code the forms, giving them hard-coded variable names. 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,

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread pbreit
I don't really understand the point of auto_import or what it does exactly but it does *NOT* read the database. Per the book it reads the metadata in the .table files (which your code is deleting with os.remove(dbfolder+/test.table)). Maybe it's time to ask: what are you trying to do?

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

2012-05-14 Thread pbreit
Consider the easiest approach first: put all the address fields in the candidate table. If you have good reason to believe this is not the DB design you want, then consider a separate address table. That will complicate the code a bit because you'll need to program the logic to link the

Re: [web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Richard Vézina
I want to improve it before because I don't like the way the Select _OR_ADD_Otion works... It changes the select and options class name and it prevent the use of other jQuery plugin with the autocomplete widget... For example, I want to use my AutocompleteWidgetSelectOrAddOption and asmSelect or

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Anthony
I don't really understand the point of auto_import or what it does exactly but it does *NOT* read the database. Per the book it reads the metadata in the .table files (which your code is deleting with os.remove(dbfolder+/test.table)). Correct, auto_import looks at the *.table files in

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Massimo Di Pierro
can you use chrome to see what is the ajax request? Can you try call the url of the ajax request manually? What do you get? A ticket? On Monday, 14 May 2012 08:55:53 UTC-5, Larry Wapnitsky wrote: Even if I remove fieldname, et.al. after the table name, no data. On Friday, May 11, 2012

[web2py] Re: Suggestion about using jqmobile in web2py

2012-05-14 Thread Massimo Di Pierro
Please open a ticket about this. I do not think this belongs to the welcome app but, if we can use it in admin (instead of the current mobile admin also based on jquery mobile) then you will be able to do: {{extend '../../admin/views/jqm_layout.html'}} On Monday, 14 May 2012 04:30:23 UTC-5,

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Massimo Di Pierro
If one has more than 10 tables, one should use conditional models and one should move all state dependent settings into the controllers that need them, Massimo On Monday, 14 May 2012 11:36:00 UTC-5, pbreit wrote: Aren't 135 table definitions going to be a problem in a high volume app?

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Larry Wapnitsky
404 not found On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote: can you use chrome to see what is the ajax request? Can you try call the url of the ajax request manually? What do you get? A ticket? On Monday, 14 May 2012 08:55:53 UTC-5, Larry Wapnitsky wrote: Even if I

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Larry Wapnitsky
can I send you a copy of the project directory for a quick analysis? On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote: can you use chrome to see what is the ajax request? Can you try call the url of the ajax request manually? What do you get? A ticket? On Monday, 14 May

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread simon
Thanks. That seems to work. Wouldn't it make sense for auto_import to look for all .table files though? On Monday, 14 May 2012 19:00:08 UTC+1, Anthony wrote: I don't really understand the point of auto_import or what it does exactly but it does *NOT* read the database. Per the book it reads

[web2py] Re: when I open a second DAL connection to the same sqlite database it does not detect a new table

2012-05-14 Thread Anthony
On Monday, May 14, 2012 2:16:22 PM UTC-4, simon wrote: Thanks. That seems to work. Wouldn't it make sense for auto_import to look for all .table files though? Well, you only want it to read the .table files associated with the particular database to which you are connecting. The default

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

2012-05-14 Thread Richard Vézina
There must be conflict with the callback in the autocomplete widget when used with component. Richard On Mon, May 14, 2012 at 8:58 AM, Anthony abasta...@gmail.com wrote: Can you pack and attach a minimal app the reproduces the problem? On Monday, May 14, 2012 2:08:47 AM UTC-4, Larry

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-14 Thread Bruce Wade
Yes, I have started moving everything from models to custom api modules this weekend. I am going to try to use most of the tips provided by everyone. For the adviewer I will look to see what is calling 10 query's. However I can not cache this query as the returned ads most be random for every

[web2py] Need some help on auth (groups)(users)(member)(permissions)

2012-05-14 Thread Remco K
Hello everyone, I need -a little push in the right way- on implementing authorization. Here is what I have and what I want: 'ProjectA' has: * Multiple Users * Multiple Documents * Multiple Groups A user can have many documents A user can be a member of multiple groups A user can have multiple

Re: [web2py] Need some help on auth (groups)(users)(member)(permissions)

2012-05-14 Thread Richard Vézina
I think that the RBAC built-in in web2py can handle most part of your need, but I think you will have to build the logic you need around RBAC, noting that fancy come out of the box. Maybe there is already available app that does something similar. Richard On Mon, May 14, 2012 at 3:11 PM, Remco K

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Massimo Di Pierro
What's the url? this should be calling an action in plugin wiki. must be there. On Monday, 14 May 2012 13:11:03 UTC-5, Larry Wapnitsky wrote: 404 not found On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote: can you use chrome to see what is the ajax request? Can you try

Re: [web2py] Re: jqgrid assistance

2012-05-14 Thread Larry Wapnitsky
Here's what it's generating: h3Whitelisted Addresses/h3table id=jqgrid_ips/tablediv id= jqgrid_ips_pager/divscript!-- jQuery(document).ready(function(){jQuery(#jqgrid_ips).jqGrid({ url:

[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.

[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 indexes

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: 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 the

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)). delete()

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

[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

[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

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 david.wald...@gmail.com 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

[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 *

[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: 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] 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] 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

[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] 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 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 =

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

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 ml.richard.vez...@gmail.com wrote: Think you should read the book section about more then

[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

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 pbreitenb...@gmail.com wrote: Consider the

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 abasta...@gmail.com wrote: After you define your custom auth_user table, you still have to call: auth.define_tables() Anthony On

[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

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

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 =

  1   2   >