Re: [web2py] Re: faster way to import csv

2013-08-27 Thread Michele Comitini
Guruyaya, Sorry could you rephrase? I am not sure to understand what I am missing. I was suggesting to Sebastian to use database features to import a large chunk CSV data, bypassing web2py, to avoid speed problems he was experimenting. mic 2013/8/27 guruyaya > Michele, I think you're missin

[web2py] Best approach to render fragments

2013-08-27 Thread Paolo Valleri
Dear all, I am trying to understand which is the best way to render a fragment (which can be inside an other fragment and so on). Lets take a very simple example in which I render a list of comments, and by clicking the 'more' button, few other are loaded with ajax. So far I found a couple of wo

Re: [web2py] Re: "required" class for required fields

2013-08-27 Thread Manuele Pesenti
Il 25/08/13 00:37, mr.freeze ha scritto: > I want to take advantage of bootstrap's form validation classes so I > need to add a class to the field. if could be of any help that's the ugly way how I solved it locally :) def dressMandatory(grid, table): """ Special representation for mandatory f

[web2py] Multilingual Content Management System with language switcher (Internationalization)

2013-08-27 Thread xelomac
Hi folks, I'm working on a multilingual CMS. Therefore I need to give the site visitor the option to change the content language using a language switcher menu link. My question is about changing content language not about changing surface language (please no T function answers here :-) So f

Re: [web2py] Re: Cannot get into Admin on any of my apps

2013-08-27 Thread Massimo Di Pierro
Thanks. Please check the latest trunk. I think it is now fixed. On Monday, 26 August 2013 16:57:59 UTC-5, Jim S wrote: > > c:\dev\web2py\applications\admin\infocenter > > ...when I clicked on the Edit button for the infocenter app. > > c:\dev\web2py\applications\admin\admin > > ...when I click on

[web2py] Re: CAS provider and registration

2013-08-27 Thread Massimo Di Pierro
which web2py version? On Monday, 26 August 2013 20:06:34 UTC-5, Larry Weinberg wrote: > > I've followed instructions elsewhere and set up a CAS provider application > and a client application that uses the CAS service. > It looks like the registration options go away from the client app in this

[web2py] Re: Modifying auth.signature

2013-08-27 Thread Massimo Di Pierro
A signature is just a db.Table. You can make your own. mysignature = db.Table(Field(...),Field(...), ) On Monday, 26 August 2013 20:06:41 UTC-5, Scott Hunter wrote: > > Is there a way to use a modified version of auth.signature (in my > particular case, adding a custom_qualifier to each fiel

[web2py] Re: Multilingual Content Management System with language switcher (Internationalization)

2013-08-27 Thread Massimo Di Pierro
Look how admin does it: https://github.com/web2py/web2py/blob/master/applications/admin/views/layout.html#L62 https://github.com/web2py/web2py/blob/master/applications/admin/models/0.py#L79 On Tuesday, 27 August 2013 06:00:57 UTC-5, xelomac wrote: > > > > Hi folks, > > I'm working on a multiling

[web2py] [OT] : DevDocs - all in one API doc reader

2013-08-27 Thread Willoughby
Thought folks might find this useful: http://devdocs.io/ -- --- 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 opti

Re: [web2py] Re: Cannot get into Admin on any of my apps

2013-08-27 Thread step
It's fixed, at least for me, I had the same issue that Jim S. reported. On Tuesday, August 27, 2013 1:33:48 PM UTC+2, Massimo Di Pierro wrote: > > Thanks. Please check the latest trunk. I think it is now fixed. > -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: how to open web2py console shell on my windows 8 ??

2013-08-27 Thread kranthi aeronaut
thanx anthony , its working On Sunday, August 25, 2013 6:38:57 AM UTC-7, Anthony wrote: > > If you are using the source version of web2py, you be need to have Python > installed. If using the Windows binary, replace web2py.py with web2py.exe > in that command. > > Anthony > -- --- You receiv

[web2py] Re: Best approach to render fragments

2013-08-27 Thread Anthony
> The first approach is difficult to maintain, the example is very simple, > the chain can be arbitrary long. The second one doesn't compile, and > empty.html is very ugly. I am wondering if could be possible to have extend > and include more flexible and easier. > What exactly do you envisio

Re: [web2py] Re: Best approach to render fragments

2013-08-27 Thread paolo.vall...@gmail.com
I don't know rails at all, and actually I don't even like to compare frameworks, but with flexible and easier I meant something like (rails): "render layout: false". In a talk I attended I remember that symfony has something very similar as well. Given that, I know they are completely different fra

[web2py] HTML Table rows to db

2013-08-27 Thread Marco Mansilla
Hi, I'm working in a dynamic invoice app and so far everything it's almost done, but i need to know if it's possible to send rows from my dynamically gerated table in view to db. for example: this is my basic table db.define_table('db_products', Field('barcode'), # I use a barcode reader

[web2py] Re: CAS provider and registration

2013-08-27 Thread Larry Weinberg
I'm using 2.5.1 Once I set up the client to use the CAS provider, the registration options go away on the client. -- --- 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 e

Re: [web2py] Re: Cannot get into Admin on any of my apps

2013-08-27 Thread Jim Steil
FIXED Thanks Massimo! -Jim On Tue, Aug 27, 2013 at 7:16 AM, step wrote: > It's fixed, at least for me, I had the same issue that Jim S. reported. > > > On Tuesday, August 27, 2013 1:33:48 PM UTC+2, Massimo Di Pierro wrote: >> >> Thanks. Please check the latest trunk. I think it is now fixed.

Re: [web2py] Re: Best approach to render fragments

2013-08-27 Thread Anthony
On Tuesday, August 27, 2013 6:18:22 AM UTC-7, Paolo Valleri wrote: > I don't know rails at all, and actually I don't even like to compare > frameworks, but with flexible and easier I meant something like (rails): > "render layout: false". > I see. Yes, I suppose it would be nice to have a condi

[web2py] Re: modifying smartgrid forms

2013-08-27 Thread Jim S
Have you read the Custom Forms section of the book? http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms -Jim On Monday, August 26, 2013 5:50:28 PM UTC-5, Tobi G wrote: > > Hello! > > I like smartgrid, because you can create working prototypes very quickly, > but I do

[web2py] Re: Multilingual Content Management System with language switcher (Internationalization)

2013-08-27 Thread xelomac
Thanks - good idea - but how do I force the URL to show the language token like "domain.com/mayapp/en/mycontroller/myfunction"? On Tuesday, August 27, 2013 1:40:00 PM UTC+2, Massimo Di Pierro wrote: > > Look how admin does it: > > > https://github.com/web2py/web2py/blob/master/applications/admin/

[web2py] Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Adi
Used the Python Imaging Library (with JPEG decoder) to create set of thumbnails. For the images with jpeg extension, the error pops up that the properties can't be retrieved, while for the non-image extensions, everything displays fine. Is this a problem with PIL not generating enough header

[web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
Here is the entire "routes.py" I have: routers = dict( BASE=dict( default_application='miops', ), ) logging = 'debug' if __name__ == '__main__': import doctest doctest.testmod() I am testing the web2py (Version 2.6.0-development+timestamp.2013.08.15.10.05.27) instance

Re: [web2py] Re: Multilingual Content Management System with language switcher (Internationalization)

2013-08-27 Thread Vinicius Assef
There are examples in the book [1]. [1] http://web2py.com/books/default/chapter/29/04/the-core#URL-rewrite On Tue, Aug 27, 2013 at 1:08 PM, xelomac wrote: > Thanks - good idea - but how do I force the URL to show the language token > like "domain.com/mayapp/en/mycontroller/myfunction"? > > On Tu

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Jonathan Lundell
On 27 Aug 2013, at 9:47 AM, Wei Wang wrote: > Here is the entire "routes.py" I have: > > routers = dict( > BASE=dict( > default_application='miops', > ), > ) > > logging = 'debug' > > if __name__ == '__main__': > import doctest > doctest.testmod() > > > I am testing th

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
On Tuesday, August 27, 2013 12:54:51 PM UTC-4, Jonathan Lundell wrote: > > On 27 Aug 2013, at 9:47 AM, Wei Wang > > wrote: > > I have 2 simple apps: midash and miops. I intend to require user > authentication for accessing "midash" and not "miops". > > In "miops/controllers/default.py" I have o

[web2py] compute help

2013-08-27 Thread greenpoise
Is this correct? Field('cost',compute=lambda r: r['price']*db.supplier[r.supplier_id]. pricecoefficient) -- --- 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

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Jonathan Lundell
On 27 Aug 2013, at 10:38 AM, Wei Wang wrote: > On Tuesday, August 27, 2013 12:54:51 PM UTC-4, Jonathan Lundell wrote: > On 27 Aug 2013, at 9:47 AM, Wei Wang wrote: >> I have 2 simple apps: midash and miops. I intend to require user >> authentication for accessing "midash" and not "miops". >> >>

[web2py] How to query many to many with three fields?

2013-08-27 Thread Apple Mason
I have this many to many relationship example: db.define_table('location', Field('geom', 'geometry()')) db.define_table('item', Field('name')) db.define_table('item_location', Field('item', db.item), Field('location_one', db.location), Field('location_two', db.location)) T

[web2py] Begginer questions about web2py

2013-08-27 Thread Gallien Labeyrie
Hello, Coming from a PHP background, I've recently discovered Web2Py framework and I am amazed Its embed functionalities. However I'm wondering If someone among the community could enlighten me : - What's the easiest way to debbug in web2py ? (=> what would be the equivalent to dump variable c

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
VERSION = Version 2.6.0-development+timestamp.2013.08.15.10.05.27 On Tuesday, August 27, 2013 2:04:54 PM UTC-4, Jonathan Lundell wrote: > > On 27 Aug 2013, at 10:38 AM, Wei Wang > > wrote: > > On Tuesday, August 27, 2013 12:54:51 PM UTC-4, Jonathan Lundell wrote: >> >> On 27 Aug 2013, at 9:47 AM,

Re: [web2py] Re: Multilingual Content Management System with language switcher (Internationalization)

2013-08-27 Thread xelomac
As you can see in my first post I used the example from the book. If I understand it right this solution allows to access a page in the preferred language by calling it with the URL containing the language token, set the request.uri_language and keep the language token for further navigation th

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Jonathan Lundell
On 27 Aug 2013, at 11:24 AM, Wei Wang wrote: > VERSION = Version 2.6.0-development+timestamp.2013.08.15.10.05.27 Generally, there should be an indication of a specific error, which we're not seeing here. But the logic for error reporting has changed recently, so... Please try an access to a con

[web2py] Re: Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Niphlod
your thmbnail doesn't have an extension: do you set the content-type manually ? On Tuesday, August 27, 2013 6:22:17 PM UTC+2, Adi wrote: > > > Used the Python Imaging Library (with JPEG decoder) to create set of > thumbnails. For the images with jpeg extension, the error pops up that the > prop

[web2py] Re: Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Adi
This is the example I used for resizing images: http://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio, and the one with extension .thumbnail works fine, but jpeg doesn't. I didn't set the content-type manually. On Tuesday, August 27, 201

Re: [web2py] Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Ricardo Pedroso
On Tue, Aug 27, 2013 at 5:22 PM, Adi wrote: > Used the Python Imaging Library (with JPEG decoder) to create set of > thumbnails. For the images with jpeg extension, the error pops up that the > properties can't be retrieved, while for the non-image extensions, > everything displays fine. > > >

[web2py] Re: How to query many to many with three fields?

2013-08-27 Thread Alex
try something like this: location_one = db.item_location.with_alias('location_one') location_two = db.item_location.with_alias('location_two') rows = db((db.item_location.item == db.item.id) & (db.item.id != itemid) & ( db.item_location.location_one == location_one.id) & (db.item_location.locati

[web2py] Re: How to query many to many with three fields?

2013-08-27 Thread Apple Mason
Hey Alex, Thanks for the suggestion. The problem with the query is that 'location_one.geom.st_equals(point_x_y)' won't work. That's because the table db.item_location doesn't have a field called 'geom'. This is the error: AttributeError: 'Table' object has no attribute 'geom' Is there a way

[web2py] Re: CAS provider and registration

2013-08-27 Thread Massimo Di Pierro
I believe this is fixed in trunk. You have to update web2py and the views/default/users.html in your provider app. On Tuesday, 27 August 2013 09:33:45 UTC-5, Larry Weinberg wrote: > > I'm using 2.5.1 > > Once I set up the client to use the CAS provider, the registration options > go away on the

[web2py] Re: compute help

2013-08-27 Thread Massimo Di Pierro
I do not know the model but looks plausible. does it not work? On Tuesday, 27 August 2013 13:02:08 UTC-5, greenpoise wrote: > > Is this correct? > > Field('cost',compute=lambda r: r['price']*db.supplier[r.supplier_id]. > pricecoefficient) > > > -- --- You received this message because you are

Re: [web2py] Re: XLSM files converted to XLSX

2013-08-27 Thread Andrew Buchan
Sorry, was that request for me? My developments are all internal, not www so I've got no link to send... In terms of getting an immediate/temporary fix, how would I go about adding that mime/content type to the rocket server my web2py app runs on? On Mon, Aug 26, 2013 at 7:12 PM, Niphlod wrot

Re: [web2py] Begginer questions about web2py

2013-08-27 Thread Roberto Perdomo
Hi, 2013/8/27 Gallien Labeyrie > Hello, > > Coming from a PHP background, I've recently discovered Web2Py framework > and I am amazed Its embed functionalities. > However I'm wondering If someone among the community could enlighten me : > > - What's the easiest way to debbug in web2py ? (=> what

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I get NONE. I have these: db.define_table('supplier', Field('suppliercode'), Field('suppliername'), Field('pricecoeficient'), format='%(suppliercode)s') db.define_table('product', Field('series', 'reference series'), Field('suppliercode','reference supplier'), Field('price

[web2py] Re: compute help

2013-08-27 Thread Anthony
I would think you would get an error since both price and pricecoefficient appear to be strings rather than numeric types (also, pricecoefficient is misspelled in the table definition). Anthony On Tuesday, August 27, 2013 1:37:51 PM UTC-7, greenpoise wrote: > > I get NONE. I have these: > > db.

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I fixed the typo. No error though! I just get None as my value. On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: > > I would think you would get an error since both price and pricecoefficient > appear to be strings rather than numeric types (also, pricecoefficient is > misspelled

[web2py] Re: compute help

2013-08-27 Thread greenpoise
I fixed the typo. No error though! I just get None as my value. On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: > > I would think you would get an error since both price and pricecoefficient > appear to be strings rather than numeric types (also, pricecoefficient is > misspelled

[web2py] Re: How to query many to many with three fields?

2013-08-27 Thread Alex
my mistake, the alias should be for table location. location_one = db.location.with_alias('location_one') location_two = db.location.with_alias('location_two') I hope this works. Am Dienstag, 27. August 2013 21:51:56 UTC+2 schrieb Apple Mason: > > Hey Alex, > > Thanks for the suggestion. The p

Re: [web2py] Simple BASE in routes.py gives me "invalid request"

2013-08-27 Thread Wei Wang
"/midash/xyz/abc" gives me "invalid function (default/xyz)". "/midash/default/abcdefg" gives me "invalid function (default/abcdefg)". I just tried with a copy of the "user" function from "midash/controllers/default.py" to "miops/controllers/default.py". That gives me an error message that may b

[web2py] Re: compute help

2013-08-27 Thread greenpoise
Got it working by adding float to the compute..thanks On Tuesday, August 27, 2013 2:14:17 PM UTC-7, greenpoise wrote: > > I fixed the typo. No error though! I just get None as my value. > > > > > On Tuesday, August 27, 2013 2:08:45 PM UTC-7, Anthony wrote: >> >> I would think you would get an

[web2py] Re: Can't retrieve xy.jpeg file properties (.thumbnail vs .jpeg) from PIL resized image (2.6.0-dev)

2013-08-27 Thread Niphlod
you kinda have to. contenttype is automatically guessed from the extension only. There's no "header" instrospection. On Tuesday, August 27, 2013 9:07:56 PM UTC+2, Adi wrote: > > > This is the example I used for resizing images: > http://stackoverflow.com/questions/273946/how-do-i-resize-an-image

Re: [web2py] Re: XLSM files converted to XLSX

2013-08-27 Thread Niphlod
open gluon/contenttype.py . It's pretty much self-explanatory, but if you don't know the correct mime-type, its not going to be useful. BTW, if you find a mime-type that works out, tell us, we'll definitely include that. On Tuesday, August 27, 2013 10:40:38 PM UTC+2, Andrew Buchan wrote: > > Sor

[web2py] GoogleGroup - how do you keep track of useful code?

2013-08-27 Thread greenpoise
I cant seem to find a way to track useful code. I can only "Star" really helpful posts but finding a specific starred item is a pain in the nuts specially when I am switching tasks between web2py and other projects here at work. How do you guys keep track of that snippet of code you find on Web

[web2py] Re: GoogleGroup - how do you keep track of useful code?

2013-08-27 Thread Niphlod
usually I invite peoples to post it to web2pyslices.com. Clearly google group is useful for FAQs and so on but not for "complete solutions". On Wednesday, August 28, 2013 12:03:54 AM UTC+2, greenpoise wrote: > > I cant seem to find a way to track useful code. I can only "Star" really > helpful p

[web2py] Re: GoogleGroup - how do you keep track of useful code?

2013-08-27 Thread greenpoise
I have been to web2pyslices and I find it useful. I thought it was for full examples though. I am thinking more to place code "snippets". I can go on about writing them in a document but would probably lose track as well. Hmm. On Tuesday, August 27, 2013 3:09:56 PM UTC-7, Niphlod wrote: > >

Re: [web2py] Re: XLSM files converted to XLSX

2013-08-27 Thread Andrew Buchan
OK, I added the following MIME type as suggested by Derek application/vnd.ms-excel.sheet.macroEnabled.12 to gluon.py, which results in the file being opened/saved as xlsm, so it seems that is the correct one to use (gluon.py did have an entry for xlsm, but not the right one) However...the workbo

[web2py] Re: Begginer questions about web2py

2013-08-27 Thread samuel bonill
for debbug in web2py put tha in the view: {{=response.toolbar()}} more info: http://web2py.com/book El martes, 27 de agosto de 2013 11:06:26 UTC-5, Gallien Labeyrie escribió: > > Hello, > > Coming from a PHP background, I've recently discovered Web2Py framework > and I am amazed Its embed fun

[web2py] Re: How to query many to many with three fields?

2013-08-27 Thread Apple Mason
Yup, that did it. Many thanks, Alex! On Tuesday, August 27, 2013 5:34:03 PM UTC-4, Alex wrote: > > my mistake, the alias should be for table location. > > location_one = db.location.with_alias('location_one') > location_two = db.location.with_alias('location_two') > > > I hope this works. > > Am D

[web2py] Re: web2py | Email + IMAP | Help Wanted

2013-08-27 Thread PRACHI VAKHARIA
Please find responses inline below. Thank you. :-) > For every query and search, does the DAL adapter do all these steps? > > Read email box lists + Then Search for messages matching query + > Separate Fetch for > > each message > > Well, actually, I think the mailbox list can be set in the

Re: [web2py] Re: "required" class for required fields

2013-08-27 Thread mr.freeze
Thanks Manuele. I am hoping that a generic onrender callback for default widgets will simplify this. On Tuesday, August 27, 2013 5:38:37 AM UTC-5, Manuele wrote: > > Il 25/08/13 00:37, mr.freeze ha scritto: > > I want to take advantage of bootstrap's form validation classes so I need > to

[web2py] Re: Help with SQLite, a way to groupby values not a field?

2013-08-27 Thread davedigerati
humbly bumping... On Sunday, August 25, 2013 1:32:35 PM UTC-4, davedigerati wrote: > > Is there a way to SELECT from my (SQLite) db with example structure/data > that looks like this: > > sue | dog | cat | dog > joe | cat | rat | dog > joe | dog | dog | rat > joe | cat | cat | cat > tom | rat | d

[web2py] Re: GoogleGroup - how do you keep track of useful code?

2013-08-27 Thread Anthony
Often I just save bookmarks in my browser (organized into a set of folders by topic). Anthony On Tuesday, August 27, 2013 3:03:54 PM UTC-7, greenpoise wrote: > > I cant seem to find a way to track useful code. I can only "Star" really > helpful posts but finding a specific starred item is a pai

[web2py] Re: CAS provider and registration

2013-08-27 Thread Larry Weinberg
Thanks Massimo. I will try that On Tuesday, August 27, 2013 1:12:47 PM UTC-7, Massimo Di Pierro wrote: > > I believe this is fixed in trunk. You have to update web2py and the > views/default/users.html in your provider app. > > On Tuesday, 27 August 2013 09:33:45 UTC-5, Larry Weinberg wrote: >>