Re: [web2py] change web2py application directory
Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.347db33f-279e-4ae1-b231-66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/applications/espern/models/db_calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com javascript:wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
I'ts working, but it's results a WHERE JOIN and takes much more time than JOIN sintax :( 2013/10/29 Massimo Di Pierro massimo.dipie...@gmail.com Try this: rows = db(db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.l**ab_id)(db.researcher.id == db.researcher_lab_permission.r**esearcher_id)(db.researcher.us**er_id == db.auth_user.id).select(db.**groups.name http://db.groups.name/, db.city.name,db.**auth_user.ALL) On Monday, 28 October 2013 21:46:28 UTC-5, Diogo Munaro wrote: Here is the sql generated: SELECT groups.name, city.name, auth_user.email, name1.id, name1.is_active, name1.created_on, name1.created_by, name1.modified_on, name1.modified_by, name1.user_id, name1.image, name1.image_file, name1.lattes, name2.id, name2.is_active, name2.created_on, name2.created_by, name2.modified_on, name2.modified_by, name2.site, name2.url, name2.cnpj, name2.type_id, name2.group_id, name2.privacity FROM researcher_lab_permission, researcher, lab JOIN groups ON ((groups.id = lab.group_id) AND (groups.is_active = 'T')) JOIN city ON (city.id = groups.city_id) JOIN auth_user ON ((researcher.user_id = auth_user.id) AND (auth_user.is_active = 'T')) JOIN `researcher` AS name1 ON ( researcher.id = researcher_lab_permission.**researcher_id) JOIN `lab` AS name2 ON ((lab.id = researcher_lab_permission.lab_**id) AND (lab.is_active = 'T')) Some JOINS are wrong 2013/10/29 Diogo Munaro diogo@gmail.com I need these joins because I need filter some tables without selecting all the tables and filtering with where. Anyway, I tried: rows = (db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.l**ab_id)(db.researcher.id == db.researcher_lab_permission.r**esearcher_id)(db.researcher.us**er_id == db.auth_user.id).select(db.**groups.name http://db.groups.name/, db.city.name,db.**auth_user.ALL) And it returns: type 'exceptions.TypeError' 'Query' object is not callable I'm using db.executesql and it's working: db.executesql('''SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id= r.user_id AND l.group_id = g.id AND c.id = g.city_id WHERE a.id = %s''' %(auth.user_id)) Something strange with DAL... 2013/10/28 Massimo Di Pierro massimo@gmail.com (db.groups.**id http://db.groups.id/ == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.**l**ab_id)(db.**researcher.idhttp://db.researcher.id/ == db.researcher_lab_permission.**r**esearcher_id)(db.researcher.**us* *er_id == db.auth_user.id).select(db.**groups.namehttp://db.groups.name/ ,db.**city.name http://db.city.name/,db.**auth_user.ALL) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Many to many
Hi. I'm still making a website where I'm gone have to manage a lot of little image galleries. An image could be shown inside more galleries, galleries have many images, so my relation is many to many. Here is my db: db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('int_table_galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) Now in the company page, I want to show only images from the 1 category. In the controller: def company(): gallery_company = ? return dict(gallery_company=gallery_company) How can I select all fields from images and galleries where galleries.id==1 ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] SQLFORM factory field width is less than the text on IE8, works fine on FF
Hi, You can use the car appliance available in web2py appliances (github) to show this issue (https://github.com/mdipierro/web2py-appliances/tree/master/CarSales). *In Controller, add a function as :-* def testform(): form = SQLFORM.factory( Field('TestField', requires=IS_IN_SET(['Test Subfield1 to be selected','Test Subfield1 to be selected'],zero=T('Select Subfield'),error_message='Select Subfield'))) if form.process().accepted: response.flash = 'Thanks for the feedback' elif form.errors: response.flash = 'Error submitting feedback' return dict(form=form) * Views (testform.html)* {{extend 'layout.html'}} {{=form}} *Results:* Firefox : Internet Explorer : Can some one please explain, why is this behavior and how can this be fixed. I tried adding the below statement to controller, but it didn't fixed the problem. Also, I have tried playing with the css without any success :( form.element('select[name=TestField]')['_style']='width400px' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: GAE compatability with recent web2py versions
Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File /Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py, line 4802, in BELONGS raise SyntaxError(Not supported) I also see the same thing in your log. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Using a javascript variable in python in views
I did that but now I am facing another problem i.e. I has successfully returned the value to the div tag but I want to store that returned value in a python variable. How to do that?? On Tuesday, October 29, 2013 11:53:26 PM UTC+5:30, saurabh kathpalia wrote: I have a javascript variable which I want to use in python I m trying to do it with JSON but not able to do so How to do it -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
I'm not sure if I understand you right. What do you mean with category? Maybe you could try this to get all images with a specific gallery-id: images = db(db.int_table_galleries_images.gallery.id==1).select() return dict(images=images) - Andreas Am Mittwoch, 30. Oktober 2013 11:51:19 UTC+1 schrieb Gael Princivalle: Hi. I'm still making a website where I'm gone have to manage a lot of little image galleries. An image could be shown inside more galleries, galleries have many images, so my relation is many to many. Here is my db: db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('int_table_galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) Now in the company page, I want to show only images from the 1 category. In the controller: def company(): gallery_company = ? return dict(gallery_company=gallery_company) How can I select all fields from images and galleries where galleries.id==1 ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Using a javascript variable in python in views
On Wednesday, October 30, 2013 5:11:50 PM UTC+5:30, saurabh kathpalia wrote: I did that but now I am facing another problem i.e. It has successfully returned the value to the div tag but I want to store that returned value in a python variable. How to do that?? On Tuesday, October 29, 2013 11:53:26 PM UTC+5:30, saurabh kathpalia wrote: I have a javascript variable which I want to use in python I m trying to do it with JSON but not able to do so How to do it -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: change_password and logout redirects to user/profile and leads to too many redirects
Still in trouble with this issue. :-( -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
Thanks Andreas. Sorry I've made a mistake. Now in the company page, I want to show only images from the 1 gallery. With images = db(db.int_table_galleries_images.gallery.id==1).select() I'm still having all images, also from gallery.id==2. I've also tried with images = db(db.int_table_galleries_images.galleryhttp://db.int_table_galleries_images.gallery.id==1).select() (without id). I have all rows. Il giorno mercoledì 30 ottobre 2013 12:42:01 UTC+1, Andreas Wienes ha scritto: I'm not sure if I understand you right. What do you mean with category? Maybe you could try this to get all images with a specific gallery-id: images = db(db.int_table_galleries_images.gallery.id==1).select() return dict(images=images) - Andreas Am Mittwoch, 30. Oktober 2013 11:51:19 UTC+1 schrieb Gael Princivalle: Hi. I'm still making a website where I'm gone have to manage a lot of little image galleries. An image could be shown inside more galleries, galleries have many images, so my relation is many to many. Here is my db: db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('int_table_galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) Now in the company page, I want to show only images from the 1 category. In the controller: def company(): gallery_company = ? return dict(gallery_company=gallery_company) How can I select all fields from images and galleries where galleries.id==1 ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Bing appliance
I installed the bingsearch app from https://github.com/mdipierro/web2py-appliances/tree/master/BingApi. I then changed the APPID to my account key but i get the error class 'applications.BINGSEARCH.modules.bingapi_w.BingException' Parameter has invalid value. Please what is wrong? On Thursday, February 16, 2012 5:02:16 AM UTC, Massimo Di Pierro wrote: Keep us updated. I'd be happy to replace the bing appliance with a better one and credit you. On Feb 15, 4:55 pm, Tim Anyasi tim.any...@gmail.com wrote: Trying to update the bing appliancehttps:// github.com/mdipierro/web2py-appliances/tree/master/BingApi to use the version2 of bing api. Here is the original modulehttps:// github.com/agiliq/searchapi/blob/master/searchapi/bingapi.py and here is the module for version 2 https://github.com/agiliq/searchapi/blob/master/searchapi/simplesearc... they look completely different. Will like to make it work like thishttp://demos.9lessons.info/Bing.html Thanks Disclosure: new to python, but I am loving web2py -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: change_password and logout redirects to user/profile and leads to too many redirects
I finally found a solution. It's like Jonathan Lundell explained in this thread https://groups.google.com/forum/#!topic/web2py/LUCVm9pKX28: The normal call, form=auth(), is dynamic (see Auth.__call__), and returns the form that's appropriate to the request URL. Auth.register() does a redirect to profile if the user is logged in. Now I could work around this problem. Maybe it's a good idea to mention this in the documentation and to make this behavior configurable. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
This is discussed here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Many-to-many db((db.images.id == db.int_table_galleries_images.image) (db.galleries.id == db.int_table_galleries_images.gallery) (db.galleries.id == 1)).select() Anthony On Wednesday, October 30, 2013 6:51:19 AM UTC-4, Gael Princivalle wrote: Hi. I'm still making a website where I'm gone have to manage a lot of little image galleries. An image could be shown inside more galleries, galleries have many images, so my relation is many to many. Here is my db: db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('int_table_galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) Now in the company page, I want to show only images from the 1 category. In the controller: def company(): gallery_company = ? return dict(gallery_company=gallery_company) How can I select all fields from images and galleries where galleries.id==1 ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
Also, you might consider shortening the name of db.int_table_galleries_images to just db.galleries_images? You already know it's a table, so no need for table in the name, and galleries_images already implies it's a many-to-many intermediate table. Anthony On Wednesday, October 30, 2013 8:52:00 AM UTC-4, Anthony wrote: This is discussed here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Many-to-many db((db.images.id == db.int_table_galleries_images.image) (db.galleries.id == db.int_table_galleries_images.gallery) (db.galleries.id == 1)).select() Anthony On Wednesday, October 30, 2013 6:51:19 AM UTC-4, Gael Princivalle wrote: Hi. I'm still making a website where I'm gone have to manage a lot of little image galleries. An image could be shown inside more galleries, galleries have many images, so my relation is many to many. Here is my db: db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('int_table_galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) Now in the company page, I want to show only images from the 1 category. In the controller: def company(): gallery_company = ? return dict(gallery_company=gallery_company) How can I select all fields from images and galleries where galleries.id==1 ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Using a javascript variable in python in views
Please show your code. On Wednesday, October 30, 2013 7:41:50 AM UTC-4, saurabh kathpalia wrote: I did that but now I am facing another problem i.e. I has successfully returned the value to the div tag but I want to store that returned value in a python variable. How to do that?? On Tuesday, October 29, 2013 11:53:26 PM UTC+5:30, saurabh kathpalia wrote: I have a javascript variable which I want to use in python I m trying to do it with JSON but not able to do so How to do it -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Auth User Table Modifications
In this case use Oauth or CAS?? Richard On Tue, Oct 29, 2013 at 6:04 PM, archean...@gmail.com wrote: It seems there are enough times where people either put in fake e-mails or rather not put in e-mails. I personally believe this should be optional in most cases. Sometimes the account isn't important enough that you may want to go through the trouble of retrieving a password and might rather set up a new account. On Tuesday, October 29, 2013 3:00:20 PM UTC-4, Massimo Di Pierro wrote: auth.define_tables(username=**True) db.auth_user.first_name.**writable = db.auth_user.first_name.**readable = False ... same for last_name and for email ... yet without email how to you retrieve a password? On Tuesday, 29 October 2013 09:10:51 UTC-5, arche...@gmail.com wrote: I was wondering how I would go about removing First Name and Last Name from the user table and making email not required. Is this possible without breaking Auth? Again, thank you very much for your support! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
It depends of what you do with the groups... You have to write your own logic around them... For instance you have driver group, so in your code you let driver group access only page/controller fucntion and form they are allow and in those controller you control the flow of what they can do the way you want. The group only diserve the purpose to determine if a user is allow or not to do something... So you can put a user at the same time in a group of driver and a dispatcher if you want. So if he want to behave like a driver he can, and when he want to behave like a dispatcher it can too... Hope it helps. Richard On Tue, Oct 29, 2013 at 10:32 PM, raferbop rafer...@gmail.com wrote: Richard, I am trying to create a number of number of groups, who are assigned users with different roles. A good example is where you have different taxi companies, that have its own dispatch personnel and drivers. For example, lets say you have 2 companies with the following employees; Company A 1.) Mark Biggs - Driver 2.) Kerry Hinds - Dispatcher Company B 1.) Mimi Johnson - Driver 2.) David Hanson - Dispatcher I want to create 2 groups, add employees to each, an assign roles. I read the chapter on access control, but I still don't understand how to create a multi-group user database. On Tuesday, October 29, 2013 11:20:02 AM UTC-5, Richard wrote: What do you want exactly? auth_membership is a many-to-many table that put in relation auth_user and auth_group... What do you mean by implement auth_group, etc. you don't need to, they are built-in web2py... If you explain more what you want exactly we can provide more insight on what you need... If you just want to activate RBAC you should read the book, about that : http://web2py.com/books/**default/chapter/29/09/access-** control?search=RBAC#Access-**Controlhttp://web2py.com/books/default/chapter/29/09/access-control?search=RBAC#Access-Control Richard On Tue, Oct 29, 2013 at 10:46 AM, raferbop rafe...@gmail.com wrote: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
If you have two diffrents companie you may consider multi-tenant site. Richard On Wed, Oct 30, 2013 at 9:47 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: It depends of what you do with the groups... You have to write your own logic around them... For instance you have driver group, so in your code you let driver group access only page/controller fucntion and form they are allow and in those controller you control the flow of what they can do the way you want. The group only diserve the purpose to determine if a user is allow or not to do something... So you can put a user at the same time in a group of driver and a dispatcher if you want. So if he want to behave like a driver he can, and when he want to behave like a dispatcher it can too... Hope it helps. Richard On Tue, Oct 29, 2013 at 10:32 PM, raferbop rafer...@gmail.com wrote: Richard, I am trying to create a number of number of groups, who are assigned users with different roles. A good example is where you have different taxi companies, that have its own dispatch personnel and drivers. For example, lets say you have 2 companies with the following employees; Company A 1.) Mark Biggs - Driver 2.) Kerry Hinds - Dispatcher Company B 1.) Mimi Johnson - Driver 2.) David Hanson - Dispatcher I want to create 2 groups, add employees to each, an assign roles. I read the chapter on access control, but I still don't understand how to create a multi-group user database. On Tuesday, October 29, 2013 11:20:02 AM UTC-5, Richard wrote: What do you want exactly? auth_membership is a many-to-many table that put in relation auth_user and auth_group... What do you mean by implement auth_group, etc. you don't need to, they are built-in web2py... If you explain more what you want exactly we can provide more insight on what you need... If you just want to activate RBAC you should read the book, about that : http://web2py.com/books/**default/chapter/29/09/access-** control?search=RBAC#Access-**Controlhttp://web2py.com/books/default/chapter/29/09/access-control?search=RBAC#Access-Control Richard On Tue, Oct 29, 2013 at 10:46 AM, raferbop rafe...@gmail.com wrote: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic.esp...@gmail.com wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.347db33f-279e-4ae1-b231-66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/applications/espern/models/db_calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
http://en.wikipedia.org/wiki/Hard_link On Wed, Oct 30, 2013 at 9:52 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic.esp...@gmail.com wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.347db33f-279e-4ae1-b231-66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/applications/espern/models/db_calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
What fields do you need to select. We can optimize this. On Wednesday, 30 October 2013 05:17:09 UTC-5, Diogo Munaro wrote: I'ts working, but it's results a WHERE JOIN and takes much more time than JOIN sintax :( 2013/10/29 Massimo Di Pierro massimo@gmail.com javascript: Try this: rows = db(db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.l**ab_id)(db.researcher.id == db.researcher_lab_permission.r**esearcher_id)(db.researcher.us**er_id == db.auth_user.id).select(db.**groups.name http://db.groups.name/, db.city.name,db.**auth_user.ALL) On Monday, 28 October 2013 21:46:28 UTC-5, Diogo Munaro wrote: Here is the sql generated: SELECT groups.name, city.name, auth_user.email, name1.id, name1.is_active, name1.created_on, name1.created_by, name1.modified_on, name1.modified_by, name1.user_id, name1.image, name1.image_file, name1.lattes, name2.id, name2.is_active, name2.created_on, name2.created_by, name2.modified_on, name2.modified_by, name2.site, name2.url, name2.cnpj, name2.type_id, name2.group_id, name2.privacity FROM researcher_lab_permission, researcher, lab JOIN groups ON ((groups.id = lab.group_id) AND (groups.is_active = 'T')) JOIN city ON (city.id = groups.city_id) JOIN auth_user ON ((researcher.user_id = auth_user.id) AND (auth_user.is_active = 'T')) JOIN `researcher` AS name1 ON ( researcher.id = researcher_lab_permission.**researcher_id) JOIN `lab` AS name2 ON ((lab.id = researcher_lab_permission.lab_**id) AND (lab.is_active = 'T')) Some JOINS are wrong 2013/10/29 Diogo Munaro diogo@gmail.com I need these joins because I need filter some tables without selecting all the tables and filtering with where. Anyway, I tried: rows = (db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.l**ab_id)(db.researcher.id == db.researcher_lab_permission.r**esearcher_id)(db.researcher.us**er_id == db.auth_user.id).select(db.**groups.name http://db.groups.name/, db.city.name,db.**auth_user.ALL) And it returns: type 'exceptions.TypeError' 'Query' object is not callable I'm using db.executesql and it's working: db.executesql('''SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id = r.user_id AND l.group_id = g.id AND c.id = g.city_id WHERE a.id = %s''' %(auth.user_id)) Something strange with DAL... 2013/10/28 Massimo Di Pierro massimo@gmail.com (db.groups.**id http://db.groups.id/ == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.**l**ab_id)(db.**researcher.idhttp://db.researcher.id/ == db.researcher_lab_permission.**r**esearcher_id)(db.researcher.**us **er_id == db.auth_user.id).select(db.**groups.namehttp://db.groups.name/ ,db.**city.name http://db.city.name/,db.**auth_user.ALL) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Using a javascript variable in python in views
View not enough, post the controller... Paste code here don't link file, it easier... Richard On Wed, Oct 30, 2013 at 8:57 AM, Anthony abasta...@gmail.com wrote: Please show your code. On Wednesday, October 30, 2013 7:41:50 AM UTC-4, saurabh kathpalia wrote: I did that but now I am facing another problem i.e. I has successfully returned the value to the div tag but I want to store that returned value in a python variable. How to do that?? On Tuesday, October 29, 2013 11:53:26 PM UTC+5:30, saurabh kathpalia wrote: I have a javascript variable which I want to use in python I m trying to do it with JSON but not able to do so How to do it -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] FPDF, from web-page to service.
I have created a few apps that help users to generate pdf-documents. I create some templates and let users enter some forms, the data is submitted, inserted and a PDF is returned. As this feature became popular I now have a generic function in a web2py model where I pass the function list with paragraphs and heades that gets added to the document. A lot of time saved, so far so good! Now here is the problem: People have started asking me if they could use my service from their servers. I kind of need to figure out how to convert my PDF-creating function to service. I now just want some advice on where to start. I feel that letting people submit their txt using post_vars will be messy and wont work with special characters. My thought at the moment would be to set up a soap service that receives the data for the document and stores it in the database. The service then returns a url with an uniqe key. The controller uses the key to fetch the data from the database and creates the PDF on the fly. What do you think? How would you solve this task? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
I have found the problem. Thank you Richard! For Windows users who want to move the applications subfolders out of web2py directory, the correct syntax is : mklink /J TheLinkName ThePath mklink /J created a directory junction Previously, I used mklink /D (which creates a symlink for a folder) but this doesn't work. Le mercredi 30 octobre 2013 14:53:31 UTC+1, Richard a écrit : http://en.wikipedia.org/wiki/Hard_link On Wed, Oct 30, 2013 at 9:52 AM, Richard Vézina ml.richa...@gmail.comjavascript: wrote: Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic@gmail.com javascript:wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.347db33f-279e-4ae1-b231-66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/applications/espern/models/db_calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
Hi Anthony. This is discussed here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Many-to-many I've read it before posting. Result was the same as with the code you've post: 'Rows' object has no attribute 'select' Now I've update my db as you've suggest: db.define_table('galleries', Field('title_en'), Field('title_it')) db.define_table('galleries_images', Field('gallery', 'reference galleries'), Field('image', 'reference images')) My controller: def company(): company_images = db((db.images.id == db.galleries_images.image) (db.galleries.id == db.galleries_images.gallery) (db.galleries.id == 1)).select() return dict(company_images=company_images) Perhaps it's in the view that I have to call filed in another way ? I've tried with the .select() in the for: {{for company_image in company_images.select():}} li{{=A(IMG(_src=URL('download', args=company_image.image_file_s)), _href=URL('download', args=company_image.image_file))}} span class=ppy-extcaption strong{{=(company_image.title_it)}}/strong /span /li {{pass}} Error was : 'Rows' object has no attribute 'select' And also without the select() in the for: {{for company_image in company_images:}} li{{=A(IMG(_src=URL('download', args=company_image.image_file_s)), _href=URL('download', args=company_image.image_file))}} span class=ppy-extcaption strong{{=(company_image.title_it)}}/strong /span /li {{pass}} Error was: 'Row' object has no attribute 'image_file_s' Can you help me ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
I really need these joins to filter tables instead of join all and then make a filter with WHERE (spend a long time). I only need these 2 fields. My query works great with db.executesql but I'm not working with dal optimizations, like table record versioning, and need to do some where statment by myself (is_active). It's a DAL bug? I'm using web2py 2.7.2 2013/10/30 Massimo Di Pierro massimo.dipie...@gmail.com What fields do you need to select. We can optimize this. On Wednesday, 30 October 2013 05:17:09 UTC-5, Diogo Munaro wrote: I'ts working, but it's results a WHERE JOIN and takes much more time than JOIN sintax :( 2013/10/29 Massimo Di Pierro massimo@gmail.com Try this: rows = db(db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.lab_id)(db.researcher.id == db.researcher_lab_permission.researcher_id)(db.researcher.user_id == db.auth_user.id).select(db.groups.name http://db.groups.name/, db.city.name,db.**au**th_user.ALL) On Monday, 28 October 2013 21:46:28 UTC-5, Diogo Munaro wrote: Here is the sql generated: SELECT groups.name, city.name, auth_user.email, name1.id, name1.is_active, name1.created_on, name1.created_by, name1.modified_on, name1.modified_by, name1.user_id, name1.image, name1.image_file, name1.lattes, name2.id, name2.is_active, name2.created_on, name2.created_by, name2.modified_on, name2.modified_by, name2.site, name2.url, name2.cnpj, name2.type_id, name2.group_id, name2.privacity FROM researcher_lab_permission, researcher, lab JOIN groups ON ((groups.id= lab.group_id) AND (groups.is_active = 'T')) JOIN city ON ( city.id = groups.city_id) JOIN auth_user ON ((researcher.user_id = auth_user.id) AND (auth_user.is_active = 'T')) JOIN `researcher` AS name1 ON (researcher.id = researcher_lab_permission.**rese**archer_id) JOIN `lab` AS name2 ON ((lab.id = researcher_lab_permission.lab_id) AND (lab.is_active = 'T')) Some JOINS are wrong 2013/10/29 Diogo Munaro diogo@gmail.com I need these joins because I need filter some tables without selecting all the tables and filtering with where. Anyway, I tried: rows = (db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.lab_id)(db.researcher.id == db.researcher_lab_permission.researcher_id)(db.researcher.user_id == db.auth_user.id).select(db.groups.name http://db.groups.name/ ,db.city.name,db.**au**th_user.ALL) And it returns: type 'exceptions.TypeError' 'Query' object is not callable I'm using db.executesql and it's working: db.executesql('''SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id = r.user_id AND l.group_id = g.id AND c.id = g.city_id WHERE a.id = %s''' %(auth.user_id)) Something strange with DAL... 2013/10/28 Massimo Di Pierro massimo@gmail.com (db.groups.**id http://db.groups.id/ == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.**lab_id)(db.**researcher.idhttp://db.researcher.id/ == db.researcher_lab_permission.**researcher_id)(db.researcher.* *user_id == db.auth_user.id).select(db.groups.namehttp://db.groups.name/ ,db.**city.name http://db.city.name/,db.**au**th_user.ALL) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/** topic/web2py/0YdtJwCEdl4/**unsubscribehttps://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe . To unsubscribe from this group and all its topics, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this
[web2py] Re: SQLFORM factory field width is less than the text on IE8, works fine on FF
I followed your istructions but the width of the select control is the same in both the browsers IE8 and FF (300px according to line 32 of web2py.css in car_sales/static/css folder) Please try to change the value in the above mentioned css rule, clean the browsers cache, reload the page and see if it works. Furthermore form.element('select[name=TestField]')['_style']='width:400px;' should work also. Anyway I don't see the images in your post. Il giorno mercoledì 30 ottobre 2013 11:56:31 UTC+1, Sarbjit ha scritto: Hi, You can use the car appliance available in web2py appliances (github) to show this issue ( https://github.com/mdipierro/web2py-appliances/tree/master/CarSales). *In Controller, add a function as :-* def testform(): form = SQLFORM.factory( Field('TestField', requires=IS_IN_SET(['Test Subfield1 to be selected','Test Subfield1 to be selected'],zero=T('Select Subfield'),error_message='Select Subfield'))) if form.process().accepted: response.flash = 'Thanks for the feedback' elif form.errors: response.flash = 'Error submitting feedback' return dict(form=form) * Views (testform.html)* {{extend 'layout.html'}} {{=form}} *Results:* Firefox : Internet Explorer : Can some one please explain, why is this behavior and how can this be fixed. I tried adding the below statement to controller, but it didn't fixed the problem. Also, I have tried playing with the css without any success :( form.element('select[name=TestField]')['_style']='width400px' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
Great! :) Richard On Wed, Oct 30, 2013 at 10:11 AM, Loïc loic.esp...@gmail.com wrote: I have found the problem. Thank you Richard! For Windows users who want to move the applications subfolders out of web2py directory, the correct syntax is : mklink /J TheLinkName ThePath mklink /J created a directory junction Previously, I used mklink /D (which creates a symlink for a folder) but this doesn't work. Le mercredi 30 octobre 2013 14:53:31 UTC+1, Richard a écrit : http://en.wikipedia.org/wiki/**Hard_linkhttp://en.wikipedia.org/wiki/Hard_link On Wed, Oct 30, 2013 at 9:52 AM, Richard Vézina ml.richa...@gmail.comwrote: Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic@gmail.com wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.**347db33f-279e-4ae1-b231-**66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.**09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\**restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/**applications/espern/models/db_**calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\**custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\**custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2p**yhttp://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2**py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: SQLFORM factory field width is less than the text on IE8, works fine on FF
Internet Explorer (8.0) https://lh3.googleusercontent.com/-2xueDRUJGj4/UnEdyNlBgBI/AHI/z6U6gHVZDM8/s1600/ie.PNG Firefox https://lh5.googleusercontent.com/-4lS5kbjD6wg/UnEeHghReQI/AHQ/ug-GwYzbm8E/s1600/ff.PNG -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: SQLFORM factory field width is less than the text on IE8, works fine on FF
Sorry, I didn;t noticed that the pictures were not visible, I have uploaded them again. I have tried cleaning the cache of IE and reloaded the page, but I am getting the same results. Do I need to try something else? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
Loïc, just a thought... How will you manage the upgrade of web2py version? If you have only a single repo, you will make symlink in new version of web2py applications folder, but then you may face issue with the new version that force you to stick with previous version... If you have commit change over your trunk you will have to revert... I generally just copy my entire repo, that become a clone... Richard On Wed, Oct 30, 2013 at 10:56 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! :) Richard On Wed, Oct 30, 2013 at 10:11 AM, Loïc loic.esp...@gmail.com wrote: I have found the problem. Thank you Richard! For Windows users who want to move the applications subfolders out of web2py directory, the correct syntax is : mklink /J TheLinkName ThePath mklink /J created a directory junction Previously, I used mklink /D (which creates a symlink for a folder) but this doesn't work. Le mercredi 30 octobre 2013 14:53:31 UTC+1, Richard a écrit : http://en.wikipedia.org/wiki/**Hard_linkhttp://en.wikipedia.org/wiki/Hard_link On Wed, Oct 30, 2013 at 9:52 AM, Richard Vézina ml.richa...@gmail.comwrote: Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic@gmail.com wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.**347db33f-279e-4ae1-b231-**66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.**09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\**restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/**applications/espern/models/db_**calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\**custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\**custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2p**yhttp://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2**py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**grou**ps/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups
Re: [web2py] Re: Join might work? Table limits?
implicit inner join vs explicit should be same in speed terms, but... http://stackoverflow.com/questions/5273942/mysql-inner-join-vs-where 2013/10/30 Diogo Munaro diogo.mvie...@gmail.com I really need these joins to filter tables instead of join all and then make a filter with WHERE (spend a long time). I only need these 2 fields. My query works great with db.executesql but I'm not working with dal optimizations, like table record versioning, and need to do some where statment by myself (is_active). It's a DAL bug? I'm using web2py 2.7.2 2013/10/30 Massimo Di Pierro massimo.dipie...@gmail.com What fields do you need to select. We can optimize this. On Wednesday, 30 October 2013 05:17:09 UTC-5, Diogo Munaro wrote: I'ts working, but it's results a WHERE JOIN and takes much more time than JOIN sintax :( 2013/10/29 Massimo Di Pierro massimo@gmail.com Try this: rows = db(db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.lab_id)(db.researcher.id == db.researcher_lab_permission.researcher_id)(db.researcher.user_id == db.auth_user.id).select(db.groups.name http://db.groups.name/, db.city.name,db.**au**th_user.ALL) On Monday, 28 October 2013 21:46:28 UTC-5, Diogo Munaro wrote: Here is the sql generated: SELECT groups.name, city.name, auth_user.email, name1.id, name1.is_active, name1.created_on, name1.created_by, name1.modified_on, name1.modified_by, name1.user_id, name1.image, name1.image_file, name1.lattes, name2.id, name2.is_active, name2.created_on, name2.created_by, name2.modified_on, name2.modified_by, name2.site, name2.url, name2.cnpj, name2.type_id, name2.group_id, name2.privacity FROM researcher_lab_permission, researcher, lab JOIN groups ON ((groups.id= lab.group_id) AND (groups.is_active = 'T')) JOIN city ON ( city.id = groups.city_id) JOIN auth_user ON ((researcher.user_id = auth_user.id) AND (auth_user.is_active = 'T')) JOIN `researcher` AS name1 ON (researcher.id = researcher_lab_permission.**rese**archer_id) JOIN `lab` AS name2 ON ((lab.id = researcher_lab_permission.lab_id) AND (lab.is_active = 'T')) Some JOINS are wrong 2013/10/29 Diogo Munaro diogo@gmail.com I need these joins because I need filter some tables without selecting all the tables and filtering with where. Anyway, I tried: rows = (db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.lab_id)(db.researcher.id == db.researcher_lab_permission.researcher_id)(db.researcher.user_id == db.auth_user.id).select(db.groups.namehttp://db.groups.name/ ,db.city.name,db.**au**th_user.ALL) And it returns: type 'exceptions.TypeError' 'Query' object is not callable I'm using db.executesql and it's working: db.executesql('''SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id = r.user_id AND l.group_id = g.id AND c.id = g.city_id WHERE a.id = %s''' %(auth.user_id)) Something strange with DAL... 2013/10/28 Massimo Di Pierro massimo@gmail.com (db.groups.**id http://db.groups.id/ == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.**lab_id)(db.**researcher.idhttp://db.researcher.id/ == db.researcher_lab_permission.**researcher_id)(db.researcher. **user_id == db.auth_user.id).select(db.groups.namehttp://db.groups.name/ ,db.**city.name http://db.city.name/,db.**au**th_user.ALL) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/** topic/web2py/0YdtJwCEdl4/**unsubscribehttps://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe . To unsubscribe from this group and all its topics, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/0YdtJwCEdl4/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. --
[web2py] web2py 'way' for windows NET USE?
I'm looking at executing 'NET USE' using the @contextmanager code found here: http://stackoverflow.com/questions/2625877/copy-files-to-nework-path-or-drive-using-python But was wondering if there's a more 'web2py' like way to do it? Searched the forums, searched the docs and didn't see anything... Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: GAE compatability with recent web2py versions
'Belongs' was the problem. Older versions of web2py supported a limited implementation of belongs (up to 30 items in the set) on GAE datastore. Current version does not support 'belongs' on GAE datastore. I have worked around this and now have my application working again. Thanks Scott and Massimo. On Wednesday, October 30, 2013 7:39:54 AM UTC-4, David Manns wrote: Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File /Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py, line 4802, in BELONGS raise SyntaxError(Not supported) I also see the same thing in your log. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Invalid literal for long () with base 10: 'ie' - using BEAUTIFY
Hi. I've got a strange error. My db: db.define_table('models', Field('code', unique=True), Field('category'), Field('cat_id', 'reference categories'), Field('description_en'), Field('description_it'), Field('pdf_path')) db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) When I do a beautify on the images table in the same view, it works. With the models table, I've got this error: invalid literal for long() with base 10: 'ie' My controller: def hp(): models=db().select(db.models.ALL) return dict(models=models) My view: {{=BEAUTIFY(response._vars)}} I use this models table also with a Grid and it works. What's wrong ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
Hi Michele, I'm looking here the results... If I get where and natural join is different. The explain is like that: http://stackoverflow.com/questions/15996226/natural-join-vs-where-in-clauses Here is massimo suggested code: mysql explain SELECT groups.name, city.name, auth_user.id, auth_user.is_active, auth_user.created_on, auth_user.created_by, auth_user.modified_on, auth_user.modified_by, auth_user.email, auth_user.person_id, auth_user.password, auth_user.know_id, auth_user.registration_key, auth_user.reset_password_key, auth_user.registration_id FROM researcher, researcher_lab_permission, lab, groups, auth_user, city WHERE groups.id = lab.group_id) AND (lab.id= researcher_lab_permission.lab_id)) AND ( researcher.id = researcher_lab_permission.researcher_id)) AND (researcher.user_id = auth_user.id)) AND (researcher_lab_permission.is_active = 'T')) AND (lab.is_active = 'T')) AND (groups.is_active = 'T')) AND (auth_user.is_active = 'T')) - ; ++-+---+++-+-++--++ | id | select_type | table | type | possible_keys | key | key_len | ref| rows | Extra | ++-+---+++-+-++--++ | 1 | SIMPLE | city | ALL| NULL | NULL| NULL| NULL | 5535 || | 1 | SIMPLE | researcher_lab_permission | ALL| researcher_id__idx,lab_id__idx | NULL| NULL| NULL |2 | Using where; Using join buffer | | 1 | SIMPLE | lab | eq_ref | PRIMARY,group_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.lab_id|1 | Using where| | 1 | SIMPLE | groups| eq_ref | PRIMARY| PRIMARY | 4 | labsyn.lab.group_id|1 | Using where| | 1 | SIMPLE | researcher| eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.researcher_id |1 || | 1 | SIMPLE | auth_user | eq_ref | PRIMARY| PRIMARY | 4 | labsyn.researcher.user_id |1 | Using where| ++-+---+++-+-++--++ Here is with JOIN: explain SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l - JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c - ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id= r.user_id AND l.group_id = g.id - AND c.id = g.city_id - ; ++-+---+++-+-+-+--++ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | ++-+---+++-+-+-+--++ | 1 | SIMPLE | l | index | PRIMARY,group_id__idx | group_id__idx | 5 | NULL|2 | Using index| | 1 | SIMPLE | rl| ALL| researcher_id__idx,lab_id__idx | NULL| NULL| NULL|2 | Using where; Using join buffer | | 1 | SIMPLE | a | index | PRIMARY| created_by__idx | 5 | NULL|2 | Using index; Using join buffer | | 1 | SIMPLE | r | eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.rl.researcher_id |1 | Using where| | 1 | SIMPLE | g | eq_ref | PRIMARY,city_id__idx | PRIMARY | 4 | labsyn.l.group_id |1 || | 1 | SIMPLE | c | eq_ref | PRIMARY| PRIMARY | 4 | labsyn.g.city_id|1 || ++-+---+++-+-+-+--++ Without natural join
[web2py] Re: SQLFORM factory field width is less than the text on IE8, works fine on FF
Unfortunately I can't repeat your issue. In my enviroment all works fine (see attached images). https://lh3.googleusercontent.com/-g5KSzj86UXA/UnE5sH81gSI/AAM/mEcw0OqYgRs/s1600/ff_test.png https://lh4.googleusercontent.com/-AAkyGEP5Vgw/UnE5x8OTfZI/AAU/-sZLZWNzt2c/s1600/ie_test.png Are you able to access to the developer tools of IE (F12 key)? Do you know how use them? If no, please read before the Debugging HTML and CSS in http://msdn.microsoft.com/en-us/library/dd565628(v=vs.85).aspx If yes, please check the css applied to SELECT element in the page and post here a screenshot of right pane. Il giorno mercoledì 30 ottobre 2013 15:59:53 UTC+1, Sarbjit ha scritto: Sorry, I didn;t noticed that the pictures were not visible, I have uploaded them again. I have tried cleaning the cache of IE and reloaded the page, but I am getting the same results. Do I need to try something else? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] change web2py application directory
Good idea I will make a try when upgrading my web2py repo... Thank you Le 30 oct. 2013 16:01, Richard Vézina ml.richard.vez...@gmail.com a écrit : Loïc, just a thought... How will you manage the upgrade of web2py version? If you have only a single repo, you will make symlink in new version of web2py applications folder, but then you may face issue with the new version that force you to stick with previous version... If you have commit change over your trunk you will have to revert... I generally just copy my entire repo, that become a clone... Richard On Wed, Oct 30, 2013 at 10:56 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Great! :) Richard On Wed, Oct 30, 2013 at 10:11 AM, Loïc loic.esp...@gmail.com wrote: I have found the problem. Thank you Richard! For Windows users who want to move the applications subfolders out of web2py directory, the correct syntax is : mklink /J TheLinkName ThePath mklink /J created a directory junction Previously, I used mklink /D (which creates a symlink for a folder) but this doesn't work. Le mercredi 30 octobre 2013 14:53:31 UTC+1, Richard a écrit : http://en.wikipedia.org/wiki/**Hard_linkhttp://en.wikipedia.org/wiki/Hard_link On Wed, Oct 30, 2013 at 9:52 AM, Richard Vézina ml.richa...@gmail.comwrote: Hmmm... I pretty sure in linux a symlink would work, but in win it is different... If I remember there is a difference in hardlink and softlink that need to be consider... Richard On Wed, Oct 30, 2013 at 4:06 AM, Loïc loic@gmail.com wrote: Some weeks ago, I tried to create a symlink inside /applications folder, but I got an error in modules. I was using mklink command on Win7, and my app works fine when located inside /applications folder without symlink... Below is the ticket I got. Maybe you have an idea? Ticket ID 127.0.0.1.2013-09-25.13-53-37.**347db33f-279e-4ae1-b231-** 66904661519e type 'exceptions.ImportError' No module named espern.modules.models_tools Version web2py™ Version 2.6.3-stable+timestamp.2013.**09.15.17.01.20 Python Python 2.7.3: C:\Python27\python.exe (prefix: C:\Python27) Traceback Traceback (most recent call last): File C:\Users\loic\web2py\gluon\**restricted.py, line 217, in restricted exec ccode in environment File C:/Users/loic/web2py/**applications/espern/models/db_**calendar.py, line 2, in module from models_tools import start_datetime, end_datetime File C:\Users\loic\web2py\gluon\**custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File C:\Users\loic\web2py\gluon\**custom_import.py, line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named espern.modules.models_tools Le mardi 29 octobre 2013 21:55:06 UTC+1, Richard a écrit : Symbolic link? Richard On Tue, Oct 29, 2013 at 2:04 PM, wiel wiel...@gmail.com wrote: I have a local repository and a web2py installation up. how can I change web2py's application directory so that it points to the repository? or how can I let web2py use the repository? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2p**yhttp://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2**py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**grou** ps/opt_out https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py
[web2py] Re: having trouble with data-xxx when they are not a simple option
I meant the web2py online book http://web2py.com/book or is this the same somehow?. On Tuesday, October 29, 2013 8:03:36 PM UTC-4, Niphlod wrote: free and available here github.com/mdipierro/web2py-book On Tuesday, October 29, 2013 10:13:28 PM UTC+1, DenesL wrote: Is the book open to editors?. I still would like to add an example about this in there. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
Maybe I missed something, but why the simple query (with few joins) worked and the complex one (with many joins) didn't? On Wed, Oct 30, 2013 at 2:31 PM, Diogo Munaro diogo.mvie...@gmail.com wrote: Hi Michele, I'm looking here the results... If I get where and natural join is different. The explain is like that: http://stackoverflow.com/questions/15996226/natural-join-vs-where-in-clauses Here is massimo suggested code: mysql explain SELECT groups.name, city.name, auth_user.id, auth_user.is_active, auth_user.created_on, auth_user.created_by, auth_user.modified_on, auth_user.modified_by, auth_user.email, auth_user.person_id, auth_user.password, auth_user.know_id, auth_user.registration_key, auth_user.reset_password_key, auth_user.registration_id FROM researcher, researcher_lab_permission, lab, groups, auth_user, city WHERE groups.id = lab.group_id) AND (lab.id = researcher_lab_permission.lab_id)) AND (researcher.id = researcher_lab_permission.researcher_id)) AND (researcher.user_id = auth_user.id)) AND (researcher_lab_permission.is_active = 'T')) AND (lab.is_active = 'T')) AND (groups.is_active = 'T')) AND (auth_user.is_active = 'T')) - ; ++-+---+++-+-++--++ | id | select_type | table | type | possible_keys | key | key_len | ref| rows | Extra | ++-+---+++-+-++--++ | 1 | SIMPLE | city | ALL| NULL | NULL| NULL| NULL | 5535 || | 1 | SIMPLE | researcher_lab_permission | ALL| researcher_id__idx,lab_id__idx | NULL| NULL| NULL |2 | Using where; Using join buffer | | 1 | SIMPLE | lab | eq_ref | PRIMARY,group_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.lab_id|1 | Using where | | 1 | SIMPLE | groups| eq_ref | PRIMARY | PRIMARY | 4 | labsyn.lab.group_id|1 | Using where| | 1 | SIMPLE | researcher| eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.researcher_id |1 | | | 1 | SIMPLE | auth_user | eq_ref | PRIMARY | PRIMARY | 4 | labsyn.researcher.user_id |1 | Using where| ++-+---+++-+-++--++ Here is with JOIN: explain SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l - JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c - ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id = r.user_id AND l.group_id = g.id - AND c.id = g.city_id - ; ++-+---+++-+-+-+--++ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | ++-+---+++-+-+-+--++ | 1 | SIMPLE | l | index | PRIMARY,group_id__idx | group_id__idx | 5 | NULL|2 | Using index | | 1 | SIMPLE | rl| ALL| researcher_id__idx,lab_id__idx | NULL | NULL| NULL|2 | Using where; Using join buffer | | 1 | SIMPLE | a | index | PRIMARY| created_by__idx | 5 | NULL|2 | Using index; Using join buffer | | 1 | SIMPLE | r | eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.rl.researcher_id |1 | Using where | | 1 | SIMPLE | g | eq_ref | PRIMARY,city_id__idx | PRIMARY | 4 | labsyn.l.group_id |1 | | | 1 | SIMPLE | c | eq_ref | PRIMARY| PRIMARY | 4 | labsyn.g.city_id|1 | | ++-+---+++-+-+-+--++ Without natural join it's getting all the cities first without any
[web2py] Internal Error - Ticket unknown - only over HTTPS?!
Hi all, I'm running a little older version of web2py in production (1.99.7). I have two apps configured to different subdomains -- app1.domain.edu - app1 app2.domain.edu - app2 This works fine. Great in fact -- I'm using routers to make the apps default based on the domain, so appnames aren't needed. Recently we decided to add authenticated services to the applications, so I got some certificates and set up web2py over SSL. So over https, app1 works fine but app2 generates the unknown ticket issue. This doesn't appear to be any sort of permissions or storage issue (lots of room/inodes on disk, errors dir writable by app2 when requested over HTTP -- doesn't normally generate an error over HTTP, I could 777 the errors dir but I can't see how that would be an issue). Also, on the test server (where I run rocket) both sites run fine over HTTPS, albeit with cert warnings because of my self-signed test certs. There I have an two web2py daemons -- one for HTTP and one for HTTPS running on two different ports, using apache with mod_proxy to dispatch requests based on the hostname. Does anyone have any ideas? I'm thinking it's might be related to the routers feature ... or maybe somehow app1's directories or models are getting loaded when requesting app2? I'm not even really sure how to diagnose the issue as I don't see any logs to read (though I haven't ever used web2py's logging, perhaps that would help?) Also -- and I doubt this is an issue but I'll just throw it out there -- I used the same private key to generate CSRs for both SSL certificates for the two FQDNs -- is it possible that WSGI doesn't like this? As far as I know this is accepted when generating SSL certs. And I don't get any certificate issues when using the two domains.. and when just serving HTML from the filesystem w/apache everything is fine. If I don't make progress I will probably try to upgrade to the newest version of web2py and see if the issue persists... however any help is appreciated! Here are some relevant snippets from config files: /var/www/web2py/routes.py routers = dict( BASE = dict( domains = { 'app1.domain.edu': 'app1', 'www.app1.domain.edu': 'app1', 'app2.domain.edu': 'app2', 'www.app2.domain.edu': 'app2', 'www.app2.domain.edu:443': 'app2/default' # I added this after getting the error, it doesn't seem to affect it. It's not currently in my routes file, still getting error. } ), ) apache conf: NameVirtualHost *:80 Directory /var/www/web2py AllowOverride None Order Allow,Deny Deny from all Files wsgihandler.py Allow from all /Files /Directory WSGISocketPrefix /var/run/wsgi/ Virtualhost *:80 ServerName app1.domain.edu ServerAlias app2.domain.edu WSGIDaemonProcess web2py user=webadmin group=webadmin threads=15 \ display-name=%{GROUP} WSGIProcessGroup web2py WSGIApplicationGroup %{RESOURCE} # This routes all requests that aren't user-dir or awstats requests to web2py WSGIScriptAliasMatch ^(/([^~].*|awstats.*)?)$ /var/www/web2py/wsgihandler.py$1 # ... mod_user stuff that I won't bother copying is here (for tilde sites) ... # Alias /css/ /var/www/web2py/applications/app1/static/ AliasMatch ^/([^/]+)/static/(.*) \ /var/www/web2py/applications/$1/static/$2 Directory /var/www/web2py/applications/*/static/*/ Order Allow,Deny Allow from all /Directory /VirtualHost LoadModule ssl_module modules/mod_ssl.so Listen 443 NameVirtualHost *:443 VirtualHost *:443 ServerName app1.domain.edu SSLEngine on SSLCertificateFile /etc/pki/tls/certs/app1.domain.edu.crt SSLCertificateKeyFile /etc/ssl/private/server.private.key Location /admin Deny from all /Location WSGIScriptAlias / /var/www/web2py/wsgihandler.py Alias /css/ /var/www/web2py/applications/app1/static/ AliasMatch ^/([^/]+)/static/(.*) \ /var/www/web2py/applications/$1/static/$2 Directory /var/www/web2py/applications/*/static/*/ Order Allow,Deny Allow from all /Directory VirtualHost VirtualHost *:443 ServerName app2.domain.edu SSLEngine on SSLCertificateFile /etc/pki/tls/certs/app2.domain.edu.crt SSLCertificateKeyFile /etc/ssl/private/server.private.key Location /admin Deny from all /Location WSGIScriptAlias / /var/www/web2py/wsgihandler.py Alias /css/ /var/www/web2py/applications/app2/static/ AliasMatch ^/([^/]+)/static/(.*) \ /var/www/web2py/applications/$1/static/$2 Directory /var/www/web2py/applications/*/static/*/ Order Allow,Deny Allow from all /Directory VirtualHost -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving
Re: [web2py] Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
On Wednesday, October 30, 2013 6:48:51 AM UTC-7, Richard wrote: If you have two diffrents companie you may consider multi-tenant site. What's your recommended readling list for this? /dps Richard On Wed, Oct 30, 2013 at 9:47 AM, Richard Vézina ml.richa...@gmail.comjavascript: wrote: It depends of what you do with the groups... You have to write your own logic around them... For instance you have driver group, so in your code you let driver group access only page/controller fucntion and form they are allow and in those controller you control the flow of what they can do the way you want. The group only diserve the purpose to determine if a user is allow or not to do something... So you can put a user at the same time in a group of driver and a dispatcher if you want. So if he want to behave like a driver he can, and when he want to behave like a dispatcher it can too... Hope it helps. Richard On Tue, Oct 29, 2013 at 10:32 PM, raferbop rafe...@gmail.comjavascript: wrote: Richard, I am trying to create a number of number of groups, who are assigned users with different roles. A good example is where you have different taxi companies, that have its own dispatch personnel and drivers. For example, lets say you have 2 companies with the following employees; Company A 1.) Mark Biggs - Driver 2.) Kerry Hinds - Dispatcher Company B 1.) Mimi Johnson - Driver 2.) David Hanson - Dispatcher I want to create 2 groups, add employees to each, an assign roles. I read the chapter on access control, but I still don't understand how to create a multi-group user database. On Tuesday, October 29, 2013 11:20:02 AM UTC-5, Richard wrote: What do you want exactly? auth_membership is a many-to-many table that put in relation auth_user and auth_group... What do you mean by implement auth_group, etc. you don't need to, they are built-in web2py... If you explain more what you want exactly we can provide more insight on what you need... If you just want to activate RBAC you should read the book, about that : http://web2py.com/books/default/chapter/29/09/access-control?search=RBAC#Access-Control Richard On Tue, Oct 29, 2013 at 10:46 AM, raferbop rafe...@gmail.com wrote: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Join might work? Table limits?
Hi Vinicius! The query with a lot of natural joins really don't work, but join with WHERE worked. I don't know what happend, but web2py become crazy when I set more natural joins 2013/10/30 Vinicius Assef vinicius...@gmail.com Maybe I missed something, but why the simple query (with few joins) worked and the complex one (with many joins) didn't? On Wed, Oct 30, 2013 at 2:31 PM, Diogo Munaro diogo.mvie...@gmail.com wrote: Hi Michele, I'm looking here the results... If I get where and natural join is different. The explain is like that: http://stackoverflow.com/questions/15996226/natural-join-vs-where-in-clauses Here is massimo suggested code: mysql explain SELECT groups.name, city.name, auth_user.id, auth_user.is_active, auth_user.created_on, auth_user.created_by, auth_user.modified_on, auth_user.modified_by, auth_user.email, auth_user.person_id, auth_user.password, auth_user.know_id, auth_user.registration_key, auth_user.reset_password_key, auth_user.registration_id FROM researcher, researcher_lab_permission, lab, groups, auth_user, city WHERE groups.id = lab.group_id) AND ( lab.id = researcher_lab_permission.lab_id)) AND (researcher.id = researcher_lab_permission.researcher_id)) AND (researcher.user_id = auth_user.id)) AND (researcher_lab_permission.is_active = 'T')) AND (lab.is_active = 'T')) AND (groups.is_active = 'T')) AND (auth_user.is_active = 'T')) - ; ++-+---+++-+-++--++ | id | select_type | table | type | possible_keys | key | key_len | ref| rows | Extra | ++-+---+++-+-++--++ | 1 | SIMPLE | city | ALL| NULL | NULL| NULL| NULL | 5535 || | 1 | SIMPLE | researcher_lab_permission | ALL| researcher_id__idx,lab_id__idx | NULL| NULL| NULL |2 | Using where; Using join buffer | | 1 | SIMPLE | lab | eq_ref | PRIMARY,group_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.lab_id|1 | Using where | | 1 | SIMPLE | groups| eq_ref | PRIMARY | PRIMARY | 4 | labsyn.lab.group_id| 1 | Using where| | 1 | SIMPLE | researcher| eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.researcher_lab_permission.researcher_id |1 | | | 1 | SIMPLE | auth_user | eq_ref | PRIMARY | PRIMARY | 4 | labsyn.researcher.user_id | 1 | Using where| ++-+---+++-+-++--++ Here is with JOIN: explain SELECT l.id,g.name,c.name FROM researcher_lab_permission as rl JOIN lab as l - JOIN researcher as r JOIN auth_user as a JOIN groups as g JOIN city as c - ON rl.researcher_id = r.id AND rl.lab_id = l.id AND a.id = r.user_id AND l.group_id = g.id - AND c.id = g.city_id - ; ++-+---+++-+-+-+--++ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | ++-+---+++-+-+-+--++ | 1 | SIMPLE | l | index | PRIMARY,group_id__idx | group_id__idx | 5 | NULL|2 | Using index | | 1 | SIMPLE | rl| ALL| researcher_id__idx,lab_id__idx | NULL | NULL| NULL|2 | Using where; Using join buffer | | 1 | SIMPLE | a | index | PRIMARY| created_by__idx | 5 | NULL|2 | Using index; Using join buffer | | 1 | SIMPLE | r | eq_ref | PRIMARY,user_id__idx | PRIMARY | 4 | labsyn.rl.researcher_id |1 | Using where | | 1 | SIMPLE | g | eq_ref | PRIMARY,city_id__idx | PRIMARY | 4 | labsyn.l.group_id |1 | | | 1 | SIMPLE | c | eq_ref |
[web2py] Re: [web2py-dev] having trouble with data-xxx when they are not a simple option
yes. It is the same. You can send me a patch of a pull request. On Oct 30, 2013, at 12:37 PM, DenesL wrote: I meant the web2py online book or is this the same somehow?. On Tuesday, October 29, 2013 8:03:36 PM UTC-4, Niphlod wrote: free and available here github.com/mdipierro/web2py-book On Tuesday, October 29, 2013 10:13:28 PM UTC+1, DenesL wrote: Is the book open to editors?. I still would like to add an example about this in there. -- -- mail from:GoogleGroups web2py-developers mailing list make speech: web2py-develop...@googlegroups.com unsubscribe: web2py-developers+unsubscr...@googlegroups.com details : http://groups.google.com/group/web2py-developers the project: http://code.google.com/p/web2py/ official : http://www.web2py.com/ --- You received this message because you are subscribed to the Google Groups web2py-developers group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] W2p in aVPS: Rocket wsgi or behind lighttpd+fcgi
Hello When deploying web2py in a VPS as the only service, what is a better minimal option in terms of efficiency/speed?: A- Use of Rocket (default) server as a daemon (with option -n threads ...) B- Lighttp+ fcgi (unix socket to a single w2p instance Let's consider an estimated peak load of 30 simultaneous clients Despite of static content and https handling, Is there any advantage in using approach B in terms of speed? In a second case of multiple applications, What is better approach? C. one w2p instance per application (several ports) D a single w2p instance running several applications (just one port) Any suggestion welcome Thanks in advance -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: GAE compatability with recent web2py versions
This doesn't sound very backwards compatible to me; I couldn't find any documentation that says belongs DOESN'T work in GAE, and it clearly used to (if imperfectly). So is the bug that it USED to work, or that it doesn't work now? On Wednesday, October 30, 2013 11:53:04 AM UTC-4, David Manns wrote: 'Belongs' was the problem. Older versions of web2py supported a limited implementation of belongs (up to 30 items in the set) on GAE datastore. Current version does not support 'belongs' on GAE datastore. I have worked around this and now have my application working again. Thanks Scott and Massimo. On Wednesday, October 30, 2013 7:39:54 AM UTC-4, David Manns wrote: Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File /Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py, line 4802, in BELONGS raise SyntaxError(Not supported) I also see the same thing in your log. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
Hi To all, I have a very similar matter here. I was thinking in merge the two concepts, and work with multi-tenant based on the company which have launched this record. Would it be a way to work? Because member of company A should not be able to see records launched from company B. Multi-tenant would would work on it? Thanks Em terça-feira, 29 de outubro de 2013 12h46min27s UTC-2, raferbop escreveu: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=tenant#Common-fields-and-multi-tenancy On Wed, Oct 30, 2013 at 2:01 PM, Dave S snidely@gmail.com wrote: On Wednesday, October 30, 2013 6:48:51 AM UTC-7, Richard wrote: If you have two diffrents companie you may consider multi-tenant site. What's your recommended readling list for this? /dps Richard On Wed, Oct 30, 2013 at 9:47 AM, Richard Vézina ml.richa...@gmail.comwrote: It depends of what you do with the groups... You have to write your own logic around them... For instance you have driver group, so in your code you let driver group access only page/controller fucntion and form they are allow and in those controller you control the flow of what they can do the way you want. The group only diserve the purpose to determine if a user is allow or not to do something... So you can put a user at the same time in a group of driver and a dispatcher if you want. So if he want to behave like a driver he can, and when he want to behave like a dispatcher it can too... Hope it helps. Richard On Tue, Oct 29, 2013 at 10:32 PM, raferbop rafe...@gmail.com wrote: Richard, I am trying to create a number of number of groups, who are assigned users with different roles. A good example is where you have different taxi companies, that have its own dispatch personnel and drivers. For example, lets say you have 2 companies with the following employees; Company A 1.) Mark Biggs - Driver 2.) Kerry Hinds - Dispatcher Company B 1.) Mimi Johnson - Driver 2.) David Hanson - Dispatcher I want to create 2 groups, add employees to each, an assign roles. I read the chapter on access control, but I still don't understand how to create a multi-group user database. On Tuesday, October 29, 2013 11:20:02 AM UTC-5, Richard wrote: What do you want exactly? auth_membership is a many-to-many table that put in relation auth_user and auth_group... What do you mean by implement auth_group, etc. you don't need to, they are built-in web2py... If you explain more what you want exactly we can provide more insight on what you need... If you just want to activate RBAC you should read the book, about that : http://web2py.com/books/default/chapter/29/09/access-control?search=RBAC#Access-Control Richard On Tue, Oct 29, 2013 at 10:46 AM, raferbop rafe...@gmail.com wrote: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
It may apply or not, I don't know, it just option you have... You can also, manage everything with group or even create your own access management system... Richard On Wed, Oct 30, 2013 at 2:38 PM, Ari Lion BR Sp arieh.so...@gmail.comwrote: Hi To all, I have a very similar matter here. I was thinking in merge the two concepts, and work with multi-tenant based on the company which have launched this record. Would it be a way to work? Because member of company A should not be able to see records launched from company B. Multi-tenant would would work on it? Thanks Em terça-feira, 29 de outubro de 2013 12h46min27s UTC-2, raferbop escreveu: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Virtual hosting with web2py
I read Martin Mulone's blog post on virtual hosting: http://blog.martinmulone.com.ar/post/997-setup-virtual-hosting-with-web2py-and-apache2-mod-wsgi-on-ubuntu-server-1110 I wonder what part of it is relevant in webfaction's shared hosting environment, their install script does some parts of the set up. Is it just a matter of configuring routes.py? As I described here: https://groups.google.com/forum/?fromgroups=#!topic/web2py/rhQ5zMTcFT0 I have 3 applications, I want www.mydomain.com to point to my init application admin.mydomain.com to web2py's admin application cms.mydomain.com to my cms application static.mydomain.com to my dbModel application I have been struggling with hosting problems for some days now, any help to get this to work will be very much appreciated. Best Annet. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
Hi Richard, if this last comment is to me, are you telling me that I could manage 'multi-tenant like' with Group (auth-group, i guess) ? If so, how? I was not intending to develop nothing out the default in this level. regards, Em quarta-feira, 30 de outubro de 2013 16h42min33s UTC-2, Richard escreveu: It may apply or not, I don't know, it just option you have... You can also, manage everything with group or even create your own access management system... Richard On Wed, Oct 30, 2013 at 2:38 PM, Ari Lion BR Sp arieh...@gmail.comjavascript: wrote: Hi To all, I have a very similar matter here. I was thinking in merge the two concepts, and work with multi-tenant based on the company which have launched this record. Would it be a way to work? Because member of company A should not be able to see records launched from company B. Multi-tenant would would work on it? Thanks Em terça-feira, 29 de outubro de 2013 12h46min27s UTC-2, raferbop escreveu: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: W2p in aVPS: Rocket wsgi or behind lighttpd+fcgi
I've already found some answers in: http://www.web2pyslices.com/slice/show/1384/low-memory-fooprint-using-lighttpd in which option B is recomended El miércoles, 30 de octubre de 2013 19:04:27 UTC+1, Jesus Alvaro escribió: Hello When deploying web2py in a VPS as the only service, what is a better minimal option in terms of efficiency/speed?: A- Use of Rocket (default) server as a daemon (with option -n threads ...) B- Lighttp+ fcgi (unix socket to a single w2p instance Let's consider an estimated peak load of 30 simultaneous clients Despite of static content and https handling, Is there any advantage in using approach B in terms of speed? In a second case of multiple applications, What is better approach? C. one w2p instance per application (several ports) D a single w2p instance running several applications (just one port) Any suggestion welcome Thanks in advance -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] embed image from variable
I have all this working the same way as Massimo suggested with matplotlib, no problems. But, I can't for the life of me figure out how to pass a variable into the controller plot function from the view. This would be so I can, for example, ask the user to choose a variable through a form and then produce a histogram of that variable with matplotlib. Right now I have it working but only if the variable for the histogram is preset in the controller plot function. I tried to set the variable with request.vars like so: img src={{=URL(f='myplotfunction', vars=dict(myvar=userselectedvar))}}/ And then simply use request.vars.myvar in the function: def myplotfunction(): ... return ... Where am I going wrong? I am misunderstanding syntax or how request.vars works? I would appreciate any help. - Josh -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Any good tutorials on how to implement auth_group, auth_membership auth_permissions?
I not given any precise advice here, just let know what exist... App design requires rely good analysis of the requirements and we don't really have it here. I think we were more in the how RBAC works, how to use it and how to applied it to your case... ... About your specific case that is different I think from raferbop, it seems that multi-tenancy is what you need... But make sure it really what you need. Multi-tenant mean, multiples companies or different departement of the same companie using the same app and share the same database because they require the same set of featured app. So you can build only one system and make sure you don't get divergent system to manage. You also get only one hardware (or virtualhost) so you save cost. It make easier datamining. But you need to be careful with data security. Richard On Wed, Oct 30, 2013 at 3:24 PM, Ari Lion BR Sp arieh.so...@gmail.comwrote: Hi Richard, if this last comment is to me, are you telling me that I could manage 'multi-tenant like' with Group (auth-group, i guess) ? If so, how? I was not intending to develop nothing out the default in this level. regards, Em quarta-feira, 30 de outubro de 2013 16h42min33s UTC-2, Richard escreveu: It may apply or not, I don't know, it just option you have... You can also, manage everything with group or even create your own access management system... Richard On Wed, Oct 30, 2013 at 2:38 PM, Ari Lion BR Sp arieh...@gmail.comwrote: Hi To all, I have a very similar matter here. I was thinking in merge the two concepts, and work with multi-tenant based on the company which have launched this record. Would it be a way to work? Because member of company A should not be able to see records launched from company B. Multi-tenant would would work on it? Thanks Em terça-feira, 29 de outubro de 2013 12h46min27s UTC-2, raferbop escreveu: I am having a difficult time in understanding how to implement the above functions, and the chapter on authentication skims over the topic. Massimo has some great examples in the appliances section, but I haven't come across an example that utilizes a many-to-many relationship with respect to groups and roles. I would appreciate if someone could direct me to some really good or extensive tutorials on that subject area. Kind regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/**web2py http://github.com/web2py/web2py(Source code) - https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: W2p in aVPS: Rocket wsgi or behind lighttpd+fcgi
I wouldn't know. Assuming you're fine with rocket's performances, it should have a lower impact on ram usage. BTW, the default setup with nginx+uwsgi is not heavy at all. On Wednesday, October 30, 2013 8:52:46 PM UTC+1, Jesus Alvaro wrote: I've already found some answers in: http://www.web2pyslices.com/slice/show/1384/low-memory-fooprint-using-lighttpd in which option B is recomended El miércoles, 30 de octubre de 2013 19:04:27 UTC+1, Jesus Alvaro escribió: Hello When deploying web2py in a VPS as the only service, what is a better minimal option in terms of efficiency/speed?: A- Use of Rocket (default) server as a daemon (with option -n threads ...) B- Lighttp+ fcgi (unix socket to a single w2p instance Let's consider an estimated peak load of 30 simultaneous clients Despite of static content and https handling, Is there any advantage in using approach B in terms of speed? In a second case of multiple applications, What is better approach? C. one w2p instance per application (several ports) D a single w2p instance running several applications (just one port) Any suggestion welcome Thanks in advance -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Invalid literal for long () with base 10: 'ie' - using BEAUTIFY
has the cat_id field been a string before being a reference in a sqlite database? If yes, you need to delete the column data and re-fill it. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Gotchas On Wednesday, October 30, 2013 4:55:50 PM UTC+1, Gael Princivalle wrote: Hi. I've got a strange error. My db: db.define_table('models', Field('code', unique=True), Field('category'), Field('cat_id', 'reference categories'), Field('description_en'), Field('description_it'), Field('pdf_path')) db.define_table('images', Field('title_en'), Field('title_it'), Field('contents'), Field('image_file', 'upload'), Field('image_file_s', 'upload')) When I do a beautify on the images table in the same view, it works. With the models table, I've got this error: invalid literal for long() with base 10: 'ie' My controller: def hp(): models=db().select(db.models.ALL) return dict(models=models) My view: {{=BEAUTIFY(response._vars)}} I use this models table also with a Grid and it works. What's wrong ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Virtual hosting with web2py
On Wed, 30 Oct 2013 12:10:10 -0700 (PDT) Annet anneve...@googlemail.com wrote: www.mydomain.com to point to my init application admin.mydomain.com to web2py's admin application cms.mydomain.com to my cms application static.mydomain.com to my dbModel application I was helped here when asked similar/same question recently and applied it to my hosting with routes.py having the following content: - cut-here - # -*- coding: utf-8 -*- routers = dict( BASE = dict( domains = { 'www.domain1com': 'app1', 'www.domain2.com': 'app2', 'www.domain3.com': 'app3', } ), ) --- cut-here Considering you're using similar (shared) hosting (webfaction), it's just question of setting your DNS entries accordingly. Sincerely, Gour -- From wherever the mind wanders due to its flickering and unsteady nature, one must certainly withdraw it and bring it back under the control of the self. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: web2py resources
On Tuesday, October 29, 2013 6:35:27 AM UTC-7, Andreas Wienes wrote: This could help for the very first orientation http://learn-web2py.com/. I like it! You might want to take a look at http://mercurial.selenic.com/wiki/BeginnersGuides to choose a tutorial for Hg. I believe the red-bean book is being updated as an Mercurial project, but I don't think they've released an RC1 yet. Also, note that Web2Py admin includes hooks into Mercurial ... it finds the installed Hg on your system and provides 1-button commits. (There might be an issue with find Mercurial if you are using TortoiseHg on Windows ... more investigation needed.) BTW, I've taken the liberty of adding Web2Py to the list on this Mercurial Wiki page: http://mercurial.selenic.com/wiki/ProjectsWithSynchronizedMercurialRepositories And this is another good source control introduction: http://www.ericsink.com/vcbe/ (Examples in git, mercurial, and Eric's employer's system) /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Many to many
{{for company_image in company_images.select():}} You've already done a select, so don't call .select() again. {{for company_image in company_images:}} li{{=A(IMG(_src=URL('download', args=company_image.image_file_s)), _href=URL('download', args=company_image.image_file))}} span class=ppy-extcaption strong{{=(company_image.title_it)}}/strong When you do a join, you can't just reference the field name -- you have to reference the table name and the field name. So, for example, company_image.image_file_s should be company_image.images.image_file_s. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: browser won't go to http://127.0.0.1:8000/admin/default/ ... whatever ...
This is still an issue issue. Clicking the Edit button for myapp at the web2py admin interface (http://127.0.0.1:8000/admin/default/myapp) brings up the interface after a very long wait. This is reproducible. Smaller apps, like the web2py welcome and examples app, load quickly when I click the Edit button ... in around a second or so. But my main app, which is quite complex, takes forever to load when I click the Edit button. This is really slowing down debug when I want to go into the db and make a change, especially since I get logged out of the admin interface after a short while. Any thoughts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: browser won't go to http://127.0.0.1:8000/admin/default/ ... whatever ...
I think I located the source of the problem, but not its solution. The web2py http://127.0.0.1:8000/admin/default/myapp page scans the static folder. I keep a huge directory of uploads there, potentially terabytes of data stored using the scheme uploadfolder=os.path.join(request.folder, 'static/data'), uploadseparate=True. When http://127.0.0.1:8000/admin/default/myapp eventually loads, it is getting hung up on the static/data folder. Is it possible to tell web2py to not scan this folder? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Best way to learn web2py
On Monday, October 28, 2013 2:11:05 PM UTC-7, Andreas Wienes wrote: I published http://learn-web2py.com a few minutes ago. It's far away from being perfect, but it's an first attempt. I'm neither an expert in web2py nor a native speaker. So all your feedback is appreciated! It's a nice, clean page. I posted more comments in the resources thread. Good work! /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: web2py 'way' for windows NET USE?
You can try this: http://code.activestate.com/lists/python-list/44825/ not web2py specific but win32 ships with web2py for windows On Wednesday, 30 October 2013 10:10:22 UTC-5, Willoughby wrote: I'm looking at executing 'NET USE' using the @contextmanager code found here: http://stackoverflow.com/questions/2625877/copy-files-to-nework-path-or-drive-using-python But was wondering if there's a more 'web2py' like way to do it? Searched the forums, searched the docs and didn't see anything... Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: GAE compatability with recent web2py versions
Belongs on GAE has always been supported. The cited code in version 2.7.4 is def BELONGS(self,first,second=None): if not isinstance(second,(list, tuple)): raise SyntaxError(Not supported) ... So perhaps you are passing something to belongs which is not a list or tuple. It is possible that in the past we did not check. On Wednesday, 30 October 2013 13:28:05 UTC-5, Scott Hunter wrote: This doesn't sound very backwards compatible to me; I couldn't find any documentation that says belongs DOESN'T work in GAE, and it clearly used to (if imperfectly). So is the bug that it USED to work, or that it doesn't work now? On Wednesday, October 30, 2013 11:53:04 AM UTC-4, David Manns wrote: 'Belongs' was the problem. Older versions of web2py supported a limited implementation of belongs (up to 30 items in the set) on GAE datastore. Current version does not support 'belongs' on GAE datastore. I have worked around this and now have my application working again. Thanks Scott and Massimo. On Wednesday, October 30, 2013 7:39:54 AM UTC-4, David Manns wrote: Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File /Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py, line 4802, in BELONGS raise SyntaxError(Not supported) I also see the same thing in your log. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] embed image from variable
Not sure I understand. You have every piece you need. def index(): form = SQLFORM.factory(Field('x')).process() return locals() and in index.html() {{=form}} {{if form.accepted:}} img src={{=URL(f='myplotfunction', vars=dict(myvar=form.vars.x))}}/ {{pass}} On Wednesday, 30 October 2013 14:55:50 UTC-5, Josh Myers wrote: I have all this working the same way as Massimo suggested with matplotlib, no problems. But, I can't for the life of me figure out how to pass a variable into the controller plot function from the view. This would be so I can, for example, ask the user to choose a variable through a form and then produce a histogram of that variable with matplotlib. Right now I have it working but only if the variable for the histogram is preset in the controller plot function. I tried to set the variable with request.vars like so: img src={{=URL(f='myplotfunction', vars=dict(myvar=userselectedvar))}}/ And then simply use request.vars.myvar in the function: def myplotfunction(): ... return ... Where am I going wrong? I am misunderstanding syntax or how request.vars works? I would appreciate any help. - Josh -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: browser won't go to http://127.0.0.1:8000/admin/default/ ... whatever ...
No but please open a ticket. There should be a way to do it, I have had the same problem. On Wednesday, 30 October 2013 20:27:26 UTC-5, weheh wrote: I think I located the source of the problem, but not its solution. The web2py http://127.0.0.1:8000/admin/default/myapp page scans the static folder. I keep a huge directory of uploads there, potentially terabytes of data stored using the scheme uploadfolder=os.path.join(request.folder, 'static/data'), uploadseparate=True. When http://127.0.0.1:8000/admin/default/myapp eventually loads, it is getting hung up on the static/data folder. Is it possible to tell web2py to not scan this folder? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Why is button value always set to working... in request.args
I have an SQLFORM that populates from a database and that has buttons set to buttons = [TAG.button('1', _name='test'), TAG.button('2', _name='test'), TAG.button('3', _name='test'), TAG.button('4', _name='test')] and when I look at the form.vars, test isn't there, but it is in request.vars, but no matter which button is clicked it always is set to Working... I'd like to do different things with the form based on which button is clicked. Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] IE11 vs gluon.contrib.user_agent - 'browser' key not existing anymore
Hello, As an information, I was performing some tries with IE11 and web2py applications, and a funny fact was appearing while using * gluon.contrib.user_agent_parser *to detect the browser. I'm used to use Chrome so here are the results of a *request.user_agent()* depending on the browser used: - *Chrome:* - Storage {'os': Storage {'version': 'NT 6.1', 'name': 'Windows'}, 'is_tablet': False, 'is_mobile': False, 'browser': Storage {'version': '29.0.1547.62', 'name': 'Chrome'}} - *IE11:* - Storage {'os': Storage {'version': 'NT 6.1', 'name': 'Windows'}, 'is_tablet': False, 'is_mobile': False} So, as you can see, 'browser' is not existing anymore with IE11 (they have removed this value from User Agent to be considered as any other browser). I don't know if it's possible to do an update of this very useful module to take care of this case ? Else, I would like to warn you to be careful with that point, because if you were using it to detect the browser (as I did), you could get an error each time you're trying to get the information (for example with: * detect(request.env.http_user_agent)['browser']* which will return a KeyError Exception). Hope it will help, Baptiste -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] SQLFORM with multiple buttons how to differentiate
I have an sqlform that populates from a db and has several submit buttons named test with different _values (and appear with different names on the screen). In PHP, the post['test'] would be equal to the button value, however, request.vars includes test, but it is always Working... on submission. I need to perform tasks based on the input button for this form. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Testing redirection with py.test
Can you please make a web2py slice about this? On Monday, 28 October 2013 18:13:22 UTC-5, viniciusban wrote: I created this gist to help people testing controllers that makes redirection: https://gist.github.com/viniciusban/7206413 Hope it helps someone. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Ticket ID type 'exceptions.TypeError' __init__() got an unexpected keyword argument 'default'
This is not the problem. The problem is that web2py calls json.dumps(..., default=) This API is supported by both json and by simplejson (which ships with web2py). The problem is that you have another version of simplejson installed. An older version that does not support this API. You should uninstall is pip uninstall simplejson The web2py change was motivated by this: http://stackoverflow.com/questions/712791/what-are-the-differences-between-json-and-simplejson-python-modules because people usually install simplejson to have a newer version of json, not an older version. ;-) On Sunday, 27 October 2013 23:24:25 UTC-5, arutti wrote: Hello, This is a json error which doesn't occur on my dev. system Windows 7, same version of web2py and python2.7 web2py™Version 2.7.4-stable+timestamp.2013.10.14.15.16.29PythonPython 2.6.6: /usr/languages/python/2.6/bin/python (prefix: /usr/languages/python/2.6)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Traceback (most recent call last): File /home/my_site/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/my_site/web2py/applications/gps_/controllers/gprs.py, line 126, in module File /home/my_site/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /home/my_site/web2py/applications/gps_/controllers/gprs.py, line 46, in call def call(): return service() File /home/my_site/web2py/gluon/tools.py, line 4913, in __call__ return self.serve_json(request.args[1:]) File /home/my_site/web2py/gluon/tools.py, line 4604, in serve_json return response.json(s) File /home/my_site/web2py/gluon/globals.py, line 598, in json return json(data, default=default or custom_json) File /home/my_site/web2py/gluon/serializers.py, line 124, in json default=default).replace(ur'\u2028', File /usr/local/lib/python2.6/site-packages/simplejson/__init__.py, line 216, in dumps **kw).encode(obj) TypeError: __init__() got an unexpected keyword argument 'default' This issue raises when I upgraded from web2py-1.99.4 to 2.7.4 To fix the problem, I modified the import of json in gluon/serializers.psto what it was in 1.99.4 and it works :-) 2.7.4 try: import simplejson as json_parser# try external module except ImportError: try: import json as json_parser # try stdlib (Python = 2.6) except: import gluon.contrib.simplejson as json_parser# fallback to pure-Python module 1.99.4 try: import json as json_parser # try stdlib (Python 2.6) except ImportError: try: import simplejson as json_parser# try external module except: import contrib.simplejson as json_parser# fallback to pure-Python module Of course this fix it not satisfactory, because I will have to apply this modification every time I upgrade web2py. Also I'd like to understand why the problem raises. Thanks and regards Andre -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: browser won't go to http://127.0.0.1:8000/admin/default/ ... whatever ...
Yes, sir! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: SQLFORM with multiple buttons how to differentiate
This should be considered a bug. I will open a ticket. On Wednesday, 30 October 2013 19:30:53 UTC-5, John Felps wrote: I have an sqlform that populates from a db and has several submit buttons named test with different _values (and appear with different names on the screen). In PHP, the post['test'] would be equal to the button value, however, request.vars includes test, but it is always Working... on submission. I need to perform tasks based on the input button for this form. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: IE11 vs gluon.contrib.user_agent - 'browser' key not existing anymore
This should be easy, please open a ticket. Thanks. On Wednesday, 30 October 2013 05:13:49 UTC-5, Baptiste.T wrote: Hello, As an information, I was performing some tries with IE11 and web2py applications, and a funny fact was appearing while using * gluon.contrib.user_agent_parser *to detect the browser. I'm used to use Chrome so here are the results of a *request.user_agent()* depending on the browser used: - *Chrome:* - Storage {'os': Storage {'version': 'NT 6.1', 'name': 'Windows'}, 'is_tablet': False, 'is_mobile': False, 'browser': Storage {'version': '29.0.1547.62', 'name': 'Chrome'}} - *IE11:* - Storage {'os': Storage {'version': 'NT 6.1', 'name': 'Windows'}, 'is_tablet': False, 'is_mobile': False} So, as you can see, 'browser' is not existing anymore with IE11 (they have removed this value from User Agent to be considered as any other browser). I don't know if it's possible to do an update of this very useful module to take care of this case ? Else, I would like to warn you to be careful with that point, because if you were using it to detect the browser (as I did), you could get an error each time you're trying to get the information (for example with: * detect(request.env.http_user_agent)['browser']* which will return a KeyError Exception). Hope it will help, Baptiste -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: GAE compatability with recent web2py versions
I was passing the contents of a list:reference field On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote: Belongs on GAE has always been supported. The cited code in version 2.7.4 is def BELONGS(self,first,second=None): if not isinstance(second,(list, tuple)): raise SyntaxError(Not supported) ... So perhaps you are passing something to belongs which is not a list or tuple. It is possible that in the past we did not check. On Wednesday, 30 October 2013 13:28:05 UTC-5, Scott Hunter wrote: This doesn't sound very backwards compatible to me; I couldn't find any documentation that says belongs DOESN'T work in GAE, and it clearly used to (if imperfectly). So is the bug that it USED to work, or that it doesn't work now? On Wednesday, October 30, 2013 11:53:04 AM UTC-4, David Manns wrote: 'Belongs' was the problem. Older versions of web2py supported a limited implementation of belongs (up to 30 items in the set) on GAE datastore. Current version does not support 'belongs' on GAE datastore. I have worked around this and now have my application working again. Thanks Scott and Massimo. On Wednesday, October 30, 2013 7:39:54 AM UTC-4, David Manns wrote: Scott is probably right - I will do some experiments to check. Earlier versions of web2py supported 'belongs' on GAE so long as the set contained 30 or fewer members (by experiment, not documented). I can see how this limited support may have been dropped in a DAL rewrite! On Tuesday, October 29, 2013 9:49:35 PM UTC-4, Scott Hunter wrote: Don't know if this helps, but I see that the query for affl uses belongs, and I'm seeing the following in my GAE log for a query that uses belongs: File /Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py, line 4802, in BELONGS raise SyntaxError(Not supported) I also see the same thing in your log. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: SQLFORM factory field width is less than the text on IE8, works fine on FF
Thanks for reply. Well, this issue that I am observing is not specific to my system only, I tried it on two other systems in IE8 and all of them were having the same issue. Anyways, I was able to get the exact width in IE, if I added a width of 400px to TD element containing the SELECT. So, I modified the web2py.css and added width for TD.w2p_fw and it resolved the issue. One question is : What If I had to modify the style using my controller i.e I want to modify the style for the element using controller only and not modifying the css file. What should be the code for the same. -Sarbjit -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Web2py install script doesn't work on the latest ubuntu
Sorry to say. Installed in on amazon and it acts like everything worked but doesn't. I think it has to do with the python versions in the installation. This was Ubuntu 13.10 as an amazon instance. BR, Jason Brower -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] can grid export represented values rather than raw db values?
My grid has a bunch of its data created with .represent. I want to export this in CSV format. The export class dumps raw underlying data without the represent values shown by the grid. Is there a way to get export to put out the represented format used by grid? Or do I have to write a custom exporter that loops through all the rows and does lambda substitutions again? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.